import { firebaseLogout, User } from '../lib/firebase/users' import { Header } from './header' import { ContractsList } from './contracts-list' import { Title } from './title' import { Row } from './layout/row' import { formatMoney } from '../lib/util/format' import { BetsList } from './bets-list' import { Spacer } from './layout/spacer' import Link from 'next/link' import clsx from 'clsx' export function UserLink(props: { displayName: string; className?: string }) { const { displayName, className } = props // Fix this when users can change their own names const username = displayName.replace(/\s+/g, '') return ( @{username} ) } function UserCard(props: { user: User }) { const { user } = props return (
{user?.avatarUrl && ( )}

{user?.email}

{formatMoney(user?.balance)}

) } export function UserPage(props: { user: User }) { const { user } = props return (
<ContractsList creator={user} /> <Spacer h={4} /> <Title className="px-2" text="Your bets" /> <BetsList user={user} /> </div> </div> </div> ) }