Fix merge
This commit is contained in:
parent
85e428f43c
commit
d8aad5e0d4
|
@ -24,19 +24,10 @@ import {
|
||||||
} from 'common/antes'
|
} from 'common/antes'
|
||||||
import { buildArray } from 'common/util/array'
|
import { buildArray } from 'common/util/array'
|
||||||
|
|
||||||
import { useIsMobile } from 'web/hooks/use-is-mobile'
|
|
||||||
import { formatMoney } from 'common/util/format'
|
import { formatMoney } from 'common/util/format'
|
||||||
import { Button } from 'web/components/button'
|
import { Button } from 'web/components/button'
|
||||||
import { MINUTE_MS } from 'common/util/time'
|
import { MINUTE_MS } from 'common/util/time'
|
||||||
|
import { useUser } from 'web/hooks/use-user'
|
||||||
export function ContractTabs(props: { contract: Contract; bets: Bet[] }) {
|
|
||||||
const { contract, bets } = props
|
|
||||||
const { openCommentBounties } = contract
|
|
||||||
|
|
||||||
const isMobile = useIsMobile()
|
|
||||||
const user = useUser()
|
|
||||||
const userBets =
|
|
||||||
user && bets.filter((bet) => !bet.isAnte && bet.userId === user.id)
|
|
||||||
|
|
||||||
export function ContractTabs(props: {
|
export function ContractTabs(props: {
|
||||||
contract: Contract
|
contract: Contract
|
||||||
|
@ -44,6 +35,7 @@ export function ContractTabs(props: {
|
||||||
userBets: Bet[]
|
userBets: Bet[]
|
||||||
}) {
|
}) {
|
||||||
const { contract, bets, userBets } = props
|
const { contract, bets, userBets } = props
|
||||||
|
const { openCommentBounties } = contract
|
||||||
|
|
||||||
const yourTrades = (
|
const yourTrades = (
|
||||||
<div>
|
<div>
|
||||||
|
@ -55,16 +47,16 @@ export function ContractTabs(props: {
|
||||||
|
|
||||||
const tabs = buildArray(
|
const tabs = buildArray(
|
||||||
{
|
{
|
||||||
title: `Comments ${
|
title: `Comments ${
|
||||||
openCommentBounties
|
openCommentBounties
|
||||||
? '(' + formatMoney(openCommentBounties) + ' Bounty)'
|
? '(' + formatMoney(openCommentBounties) + ' Bounty)'
|
||||||
: ''
|
: ''
|
||||||
}`,
|
}`,
|
||||||
tooltip: openCommentBounties
|
tooltip: openCommentBounties
|
||||||
? 'The creator of this market will award bounties to good comments'
|
? 'The creator of this market will award bounties to good comments'
|
||||||
: undefined,
|
: undefined,
|
||||||
content: <CommentsTabContent contract={contract} />,
|
content: <CommentsTabContent contract={contract} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: capitalize(PAST_BETS),
|
title: capitalize(PAST_BETS),
|
||||||
content: <BetsTabContent contract={contract} bets={bets} />,
|
content: <BetsTabContent contract={contract} bets={bets} />,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user