Add simple bets page
This commit is contained in:
parent
03a3df261c
commit
112a42406e
|
@ -44,7 +44,8 @@ export function BetsList(props: { user: User }) {
|
|||
return <></>
|
||||
}
|
||||
|
||||
if (bets.length === 0) return <div>You have not made any bets yet!</div>
|
||||
if (bets.length === 0)
|
||||
return <div className="text-gray-500">You have not made any bets yet!</div>
|
||||
|
||||
// Decending creation time.
|
||||
bets.sort((bet1, bet2) => bet2.createdTime - bet1.createdTime)
|
||||
|
|
25
web/pages/bets.tsx
Normal file
25
web/pages/bets.tsx
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { BetsList } from '../components/bets-list'
|
||||
import { Header } from '../components/header'
|
||||
import { SEO } from '../components/SEO'
|
||||
import { Title } from '../components/title'
|
||||
import { User } from '../lib/firebase/users'
|
||||
|
||||
export default function BetsPage(props: { user: User; currentUser?: User }) {
|
||||
const { user } = props
|
||||
|
||||
return (
|
||||
<div>
|
||||
<SEO title="Your bets" description="Your bets" url="/bets" />
|
||||
|
||||
<Header />
|
||||
|
||||
<div className="max-w-4xl pt-8 pb-0 sm:pb-8 mx-auto">
|
||||
<div>
|
||||
<Title text="Your bets" />
|
||||
|
||||
<BetsList user={user} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue
Block a user