import { firebaseLogout, User } from '../lib/firebase/users'
import { formatMoney } from '../../common/util/format'
import { Avatar } from './avatar'
import { Col } from './layout/col'
import { MenuButton } from './menu'
export function ProfileMenu(props: { user: User | undefined }) {
const { user } = props
return (
<>
}
/>
}
/>
>
)
}
function getNavigationOptions(
user: User | undefined,
options: { mobile: boolean }
) {
const { mobile } = options
return [
{
name: 'Home',
href: user ? '/home' : '/',
},
{
name: 'Profile',
href: '/profile',
},
...(mobile
? [
{
name: 'Markets',
href: '/markets',
},
{
name: 'Communities',
href: '/folds',
},
]
: []),
{
name: 'Your trades',
href: '/trades',
},
{
name: 'Your markets',
href: `/${user?.username ?? ''}`,
},
{
name: 'Leaderboards',
href: '/leaderboards',
},
{
name: 'Discord',
href: 'https://discord.gg/eHQBNBqXuh',
},
{
name: 'About',
href: '/about',
},
{
name: 'Sign out',
href: '#',
onClick: () => firebaseLogout(),
},
]
}
function ProfileSummary(props: { user: User | undefined }) {
const { user } = props
return (
{user?.name}
{user ? formatMoney(user.balance) : ' '}
)
}