import classNames from "classnames"; import { Icon, Icons } from "@/components/Icon"; import { UserIcon } from "@/components/UserIcon"; import { AccountProfile } from "@/pages/parts/auth/AccountCreatePart"; import { useAuthStore } from "@/stores/auth"; export interface AvatarProps { profile: AccountProfile["profile"]; sizeClass?: string; iconClass?: string; bottom?: React.ReactNode; } export function Avatar(props: AvatarProps) { return (
{props.bottom ? (
{props.bottom}
) : null}
); } export function UserAvatar(props: { sizeClass?: string; iconClass?: string; bottom?: React.ReactNode; }) { const auth = useAuthStore(); if (!auth.account) return null; return ( ); } export function NoUserAvatar(props: { sizeClass?: string; iconClass?: string; }) { return (
); }