manifold/web/pages/trades.tsx

25 lines
605 B
TypeScript
Raw Permalink Normal View History

import Router from 'next/router'
2021-12-17 23:07:08 +00:00
import { BetsList } from '../components/bets-list'
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
export default function TradesPage() {
2021-12-18 10:37:26 +00:00
const user = useUser()
2021-12-17 23:07:08 +00:00
if (user === null) {
Router.replace('/')
return <></>
}
2021-12-17 23:07:08 +00:00
return (
<Page>
<SEO title="Your trades" description="Your trades" url="/trades" />
<Title className="mx-4 md:mx-0" text="Your trades" />
2021-12-18 23:40:39 +00:00
{user && <BetsList user={user} />}
</Page>
2021-12-17 23:07:08 +00:00
)
}