diff --git a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatShortcutsRow.tsx b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatShortcutsRow.tsx index 7013215ba..5271565a5 100644 --- a/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatShortcutsRow.tsx +++ b/apps/desktop/layer/renderer/src/modules/ai-chat/components/layouts/ChatShortcutsRow.tsx @@ -171,7 +171,6 @@ const ShortcutMenuButton: React.FC = ({ return (
{ - children: ReactNode - onClick: () => void - className?: string animationDelay?: number - title?: string - style?: React.CSSProperties - ref?: React.Ref } -export const AIShortcutButton: React.FC = ({ +export const AIShortcutButton = ({ children, onClick, className, animationDelay = 0, - title, size, variant, disabled, style, ref, -}) => { + ...rest +}: AIShortcutButtonProps & HTMLMotionProps<"button">) => { return ( = ({ transition={{ delay: animationDelay, ...Spring.presets.snappy }} onClick={onClick} disabled={disabled ?? false} - title={title} className={cn(aiShortcutButtonVariants({ size, variant, disabled }), className)} - style={style} ref={ref} + {...rest} > {children} ) } + +AIShortcutButton.displayName = "AIShortcutButton" diff --git a/apps/desktop/layer/renderer/src/modules/user/ProfileButton.tsx b/apps/desktop/layer/renderer/src/modules/user/ProfileButton.tsx index 75593b744..73b5c084e 100644 --- a/apps/desktop/layer/renderer/src/modules/user/ProfileButton.tsx +++ b/apps/desktop/layer/renderer/src/modules/user/ProfileButton.tsx @@ -53,7 +53,7 @@ export const ProfileButton: FC = memo((props) => { const role = useUserRole() const isInMASReview = useIsInMASReview() - if (status === "unauthenticated") { + if (status !== "authenticated") { return } diff --git a/apps/desktop/layer/renderer/src/modules/user/UserAvatar.tsx b/apps/desktop/layer/renderer/src/modules/user/UserAvatar.tsx index f1da1458c..6ec631a38 100644 --- a/apps/desktop/layer/renderer/src/modules/user/UserAvatar.tsx +++ b/apps/desktop/layer/renderer/src/modules/user/UserAvatar.tsx @@ -7,10 +7,8 @@ import { cn } from "@follow/utils/utils" import { useServerConfigs } from "~/atoms/server-configs" import { replaceImgUrlIfNeed } from "~/lib/img-proxy" import { usePresentUserProfileModal } from "~/modules/profile/hooks" -import { useSession } from "~/queries/auth" import type { LoginProps } from "./LoginButton" -import { LoginButton } from "./LoginButton" import { UserProBadge } from "./UserProBadge" export const UserAvatar = ({ @@ -32,10 +30,6 @@ export const UserAvatar = ({ } & LoginProps & React.HTMLAttributes & { ref?: React.Ref }) => { const serverConfig = useServerConfigs() - - const { status } = useSession({ - enabled: !userId, - }) const whoami = useWhoami() const role = useUserRole() const presentUserProfile = usePresentUserProfileModal("drawer") @@ -43,10 +37,6 @@ export const UserAvatar = ({ usePrefetchUser(userId) const profile = useUserById(userId) - if (!userId && status !== "authenticated") { - return - } - const renderUserData = userId ? profile : whoami const randomColor = stringToHue(renderUserData?.name || "") return ( diff --git a/apps/desktop/layer/renderer/src/modules/user/UserGallery.tsx b/apps/desktop/layer/renderer/src/modules/user/UserGallery.tsx index dcfa56f48..ae565cb69 100644 --- a/apps/desktop/layer/renderer/src/modules/user/UserGallery.tsx +++ b/apps/desktop/layer/renderer/src/modules/user/UserGallery.tsx @@ -18,7 +18,7 @@ export const UserGallery = ({ users, limit = 18 }: UserGalleryProps) => {