import { useRouter } from 'next/router' import { firebaseLogout } from '../lib/firebase/users' import { Header } from '../components/header' import { useUser } from '../hooks/use-user' import { useState, useEffect } from 'react' import { Contract, listContracts } from '../lib/firebase/contracts' import { ContractsList } from '../components/contracts-list' export default function Account() { const user = useUser() const router = useRouter() const [contracts, setContracts] = useState([]) useEffect(() => { if (user?.id) { listContracts(user?.id).then(setContracts) } }, [user?.id]) return (
{user?.avatarUrl && ( )}

{user?.name}

{user?.email}

${user?.balanceUsd} USD

Your markets

) }