Don't remove prob

This commit is contained in:
Ian Philips 2022-08-01 10:33:37 -06:00
parent 8e801d0088
commit 086672dd4e
3 changed files with 9 additions and 6 deletions

View File

@ -156,7 +156,9 @@ export function getHtml(parsedReq: ParsedRequest) {
<div class="text-5xl">${
challengeOutcome !== '' ? 'on' + challengeOutcome : ''
}</div>
<div class="text-4xl">${probability !== '' ? 'chance' : ''}</div>
<div class="text-4xl">${
challengeAmount !== '' && probability !== '' ? 'chance' : ''
}</div>
</div>
</div>

View File

@ -10,6 +10,11 @@ export type OgCardProps = {
creatorAvatarUrl?: string
}
type ChallengeCardProps = {
challengeAmount: string
challengeOutcome: string
}
function buildCardUrl(props: OgCardProps, challengeProps?: ChallengeCardProps) {
const probabilityParam =
props.probability === undefined
@ -36,10 +41,6 @@ function buildCardUrl(props: OgCardProps, challengeProps?: ChallengeCardProps) {
challengeUrlParams
)
}
type ChallengeCardProps = {
challengeAmount: string
challengeOutcome: string
}
export function SEO(props: {
title: string

View File

@ -101,9 +101,9 @@ export default function ChallengePage(props: {
const ogCardProps = getOpenGraphProps(contract)
ogCardProps.creatorUsername = challenge.creatorUsername
ogCardProps.creatorName = challenge.creatorName
ogCardProps.creatorAvatarUrl = challenge.creatorAvatarUrl
ogCardProps.question = 'CHALLENGED:' + contract.question
ogCardProps.probability = ''
return (
<Page>