import clsx from 'clsx' import { firebaseLogout, User } from '../lib/firebase/users' import { CreatorContractsList } from './contracts-list' import { Title } from './title' import { Row } from './layout/row' import { formatMoney } from '../lib/util/format' import { SEO } from './SEO' import { Page } from './page' import { SiteLink } from './site-link' export function UserLink(props: { name: string username: string showUsername?: boolean className?: string }) { const { name, username, showUsername, className } = props return ( {name} {showUsername && ` (@${username})`} ) } function UserCard(props: { user: User; showPrivateInfo?: boolean }) { const { user, showPrivateInfo } = props return ( {user?.avatarUrl && ( )} {user.name} {showPrivateInfo && ( <> {user?.email} {formatMoney(user?.balance)} Sign Out > )} ) } export function UserPage(props: { user: User; currentUser?: User }) { const { user, currentUser } = props const isCurrentUser = user.id === currentUser?.id const possesive = isCurrentUser ? 'Your ' : `${user.name}'s ` return ( {/* */} ) }
{user?.email}
{formatMoney(user?.balance)}