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, User } from '../lib/firebase/users' const hoverClasses = 'hover:underline hover:decoration-indigo-400 hover:decoration-2' function SignedInHeaders(props: { user: User; themeClasses?: string }) { const { user, themeClasses } = props return ( <> Create a market Your bets
{user.name}
{formatMoney(user.balance)}
) } function SignedOutHeaders(props: { themeClasses?: string }) { const { themeClasses } = props return ( <>
Sign in
) } export function Header(props: { darkBackground?: boolean; children?: any }) { const { darkBackground, children } = props const user = useUser() const themeClasses = clsx(darkBackground && 'text-white', hoverClasses) return ( ) }