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 Markup from "@/components/Shared/Markup"; import Slug from "@/components/Shared/Slug"; import { Image } from "@/components/Shared/UI"; import cn from "@/helpers/cn"; import getMentions from "@/helpers/getMentions"; import AccountLink from "./AccountLink"; import AccountPreview from "./AccountPreview"; import FollowUnfollowButton from "./FollowUnfollowButton"; interface SingleAccountProps { hideFollowButton?: boolean; hideUnfollowButton?: boolean; isBig?: boolean; isVerified?: boolean; linkToAccount?: boolean; account: AccountFragment; showBio?: boolean; showUserPreview?: boolean; } const SingleAccount = ({ hideFollowButton = false, hideUnfollowButton = false, isBig = false, isVerified = false, linkToAccount = true, account, showBio = false, showUserPreview = true }: SingleAccountProps) => { const UserAvatar = () => ( {account.address} ); const UserName = () => (
{getAccount(account).name}
{(isVerified || account.hasSubscribed) && ( )} {account.heyEns?.localName && ( )}
); const AccountInfo = () => (
); return (
{linkToAccount && account.address ? ( ) : ( )}
{showBio && account?.metadata?.bio && (
{account?.metadata.bio}
)}
); }; export default memo(SingleAccount);