don't show challenge if not binary or if resolved
This commit is contained in:
parent
727b3ea4e0
commit
5252d63ef7
|
@ -34,8 +34,10 @@ export const ContractOverview = (props: {
|
||||||
|
|
||||||
const user = useUser()
|
const user = useUser()
|
||||||
const isCreator = user?.id === creatorId
|
const isCreator = user?.id === creatorId
|
||||||
|
|
||||||
const isBinary = outcomeType === 'BINARY'
|
const isBinary = outcomeType === 'BINARY'
|
||||||
const isPseudoNumeric = outcomeType === 'PSEUDO_NUMERIC'
|
const isPseudoNumeric = outcomeType === 'PSEUDO_NUMERIC'
|
||||||
|
const showChallenge = user && isBinary && !resolution
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Col className={clsx('mb-6', className)}>
|
<Col className={clsx('mb-6', className)}>
|
||||||
|
@ -118,13 +120,13 @@ export const ContractOverview = (props: {
|
||||||
{outcomeType === 'NUMERIC' && <NumericGraph contract={contract} />}
|
{outcomeType === 'NUMERIC' && <NumericGraph contract={contract} />}
|
||||||
{(contract.description || isCreator) && <Spacer h={6} />}
|
{(contract.description || isCreator) && <Spacer h={6} />}
|
||||||
{isCreator && <ShareMarket className="px-2" contract={contract} />}
|
{isCreator && <ShareMarket className="px-2" contract={contract} />}
|
||||||
{user && (
|
{showChallenge && (
|
||||||
<Col className={'ml-1'}>
|
<Row className={'ml-1 items-center'}>
|
||||||
<div>Challenge a friend</div>
|
<div>Challenge a friend</div>
|
||||||
<Row className={'mt-2 ml-1'}>
|
<Row className={'mt-2 ml-1'}>
|
||||||
<CreateChallengeButton user={user} contract={contract} />
|
<CreateChallengeButton user={user} contract={contract} />
|
||||||
</Row>
|
</Row>
|
||||||
</Col>
|
</Row>
|
||||||
)}
|
)}
|
||||||
<ContractDescription
|
<ContractDescription
|
||||||
className="px-2"
|
className="px-2"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user