2022-02-04 03:19:42 +00:00
|
|
|
import Router from 'next/router'
|
|
|
|
|
2021-12-17 23:07:08 +00:00
|
|
|
import { BetsList } from '../components/bets-list'
|
2021-12-20 04:06:30 +00:00
|
|
|
import { Page } from '../components/page'
|
2021-12-17 23:07:08 +00:00
|
|
|
import { SEO } from '../components/SEO'
|
|
|
|
import { Title } from '../components/title'
|
2021-12-18 10:37:26 +00:00
|
|
|
import { useUser } from '../hooks/use-user'
|
2021-12-17 23:07:08 +00:00
|
|
|
|
2021-12-24 21:06:01 +00:00
|
|
|
export default function TradesPage() {
|
2021-12-18 10:37:26 +00:00
|
|
|
const user = useUser()
|
2021-12-17 23:07:08 +00:00
|
|
|
|
2022-02-04 03:19:42 +00:00
|
|
|
if (user === null) {
|
|
|
|
Router.replace('/')
|
|
|
|
return <></>
|
|
|
|
}
|
|
|
|
|
2021-12-17 23:07:08 +00:00
|
|
|
return (
|
2021-12-20 04:06:30 +00:00
|
|
|
<Page>
|
2021-12-24 21:06:01 +00:00
|
|
|
<SEO title="Your trades" description="Your trades" url="/trades" />
|
2022-01-27 22:37:43 +00:00
|
|
|
<Title className="mx-4 md:mx-0" text="Your trades" />
|
2021-12-18 23:40:39 +00:00
|
|
|
{user && <BetsList user={user} />}
|
2021-12-20 04:06:30 +00:00
|
|
|
</Page>
|
2021-12-17 23:07:08 +00:00
|
|
|
)
|
|
|
|
}
|