contract tabs: always show timeline tab
This commit is contained in:
parent
13300326fd
commit
6e38540d58
|
@ -1,6 +1,3 @@
|
|||
import { useState } from 'react'
|
||||
import clsx from 'clsx'
|
||||
|
||||
import { Bet } from '../../../common/bet'
|
||||
import { Contract } from '../../../common/contract'
|
||||
import { Comment } from '../../lib/firebase/comments'
|
||||
|
@ -35,13 +32,15 @@ export function ContractTabs(props: {
|
|||
/>
|
||||
)
|
||||
|
||||
if (!user || !userBets?.length) return activity
|
||||
|
||||
const yourTrades = (
|
||||
<div>
|
||||
<MyBetsSummary className="px-2" contract={contract} bets={userBets} />
|
||||
<MyBetsSummary
|
||||
className="px-2"
|
||||
contract={contract}
|
||||
bets={userBets ?? []}
|
||||
/>
|
||||
<Spacer h={6} />
|
||||
<ContractBetsTable contract={contract} bets={userBets} />
|
||||
<ContractBetsTable contract={contract} bets={userBets ?? []} />
|
||||
<Spacer h={12} />
|
||||
</div>
|
||||
)
|
||||
|
@ -50,7 +49,9 @@ export function ContractTabs(props: {
|
|||
<Tabs
|
||||
tabs={[
|
||||
{ title: 'Timeline', content: activity },
|
||||
{ title: 'Your trades', content: yourTrades },
|
||||
...(!user || !userBets?.length
|
||||
? []
|
||||
: [{ title: 'Your trades', content: yourTrades }]),
|
||||
]}
|
||||
/>
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user