2022-04-03 20:48:25 +00:00
|
|
|
import Router from 'next/router'
|
|
|
|
import { useEffect } from 'react'
|
|
|
|
|
2022-05-09 13:04:36 +00:00
|
|
|
import { BetsList } from 'web/components/bets-list'
|
|
|
|
import { Page } from 'web/components/page'
|
|
|
|
import { SEO } from 'web/components/SEO'
|
|
|
|
import { Title } from 'web/components/title'
|
|
|
|
import { useUser } from 'web/hooks/use-user'
|
2022-04-03 20:48:25 +00:00
|
|
|
|
|
|
|
export default function PortfolioPage() {
|
|
|
|
const user = useUser()
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
if (user === null) Router.replace('/')
|
|
|
|
})
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Page>
|
|
|
|
<SEO title="Portfolio" description="Portfolio" url="/portfolio" />
|
|
|
|
<Title className="mx-4 md:mx-0" text="Portfolio" />
|
|
|
|
{user && <BetsList user={user} />}
|
|
|
|
</Page>
|
|
|
|
)
|
|
|
|
}
|