import { Bet } from 'common/bet' import { Contract } from 'common/contract' import { Comment } from 'web/lib/firebase/comments' import { User } from 'common/user' import { ContractActivity } from '../feed/contract-activity' import { ContractBetsTable, BetsSummary } from '../bets-list' import { Spacer } from '../layout/spacer' import { Tabs } from '../layout/tabs' import { Col } from '../layout/col' import { CommentTipMap } from 'web/hooks/use-tip-txns' import { LiquidityProvision } from 'common/liquidity-provision' import { useComments } from 'web/hooks/use-comments' export function ContractTabs(props: { contract: Contract user: User | null | undefined bets: Bet[] liquidityProvisions: LiquidityProvision[] comments: Comment[] tips: CommentTipMap }) { const { contract, user, bets, tips, liquidityProvisions } = props const { outcomeType } = contract const userBets = user && bets.filter((bet) => bet.userId === user.id) // Load comments here, so the badge count will be correct const updatedComments = useComments(contract.id) const comments = updatedComments ?? props.comments const betActivity = ( ) const commentActivity = ( <> {outcomeType === 'FREE_RESPONSE' && (
General Comments
)} ) const yourTrades = (
) return ( ) }