import clsx from 'clsx'
import Link from 'next/link'
import Image from 'next/image'
import { useUser } from '../hooks/use-user'
import { formatMoney } from '../lib/util/format'
import { Row } from './layout/row'
import { firebaseLogin, firebaseLogout, User } from '../lib/firebase/users'
import { MenuButton } from './menu'
const hoverClasses =
'hover:underline hover:decoration-indigo-400 hover:decoration-2'
function getNavigationOptions(user: User, options: { mobile: boolean }) {
const { mobile } = options
return [
{
name: 'Home',
href: '/',
},
...(mobile
? [
{ name: 'About', href: '/about' },
{
name: 'Create a market',
href: '/create',
},
]
: []),
{
name: 'Your bets',
href: '/bets',
},
{
name: 'Your markets',
href: `/${user.username}`,
},
{
name: 'Sign out',
onClick: () => firebaseLogout(),
},
]
}
function ProfileSummary(props: { user: User }) {
const { user } = props
return (