import { CheckBadgeIcon } from "@heroicons/react/24/solid"; import getAccount from "@hey/helpers/getAccount"; import getAvatar from "@hey/helpers/getAvatar"; import type { AccountFragment } from "@hey/indexer"; import { memo } from "react"; import Slug from "@/components/Shared/Slug"; import { Image } from "@/components/Shared/UI"; import cn from "@/helpers/cn"; import formatRelativeOrAbsolute from "@/helpers/datetime/formatRelativeOrAbsolute"; import AccountLink from "./AccountLink"; interface SmallSingleAccountProps { hideSlug?: boolean; linkToAccount?: boolean; account: AccountFragment; smallAvatar?: boolean; timestamp?: Date; } const SmallSingleAccount = ({ hideSlug = false, linkToAccount = false, account, smallAvatar = false, timestamp }: SmallSingleAccountProps) => { const UserAvatar = () => ( {account.address} ); const UserName = () => (
{getAccount(account).name} {account.hasSubscribed ? ( ) : null}
{!hideSlug && ( )} {timestamp && ( ยท {formatRelativeOrAbsolute(timestamp)} )}
); const AccountInfo = () => (
); return linkToAccount ? ( ) : ( ); }; export default memo(SmallSingleAccount);