Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: contest details OP #289

Merged
merged 2 commits into from
Jan 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions src/pages/ContestDetails/ContestDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ export const ContestDetails = () => {
}, [setLeaderboardModalOpen])

const canOptinOut = useMemo(
() => !contest?.private && (contest?.status === "CREATED" || contest?.status === "RUNNING"),
[contest?.status, contest?.private]
() => contest?.id !== 38 && !contest?.private && (contest?.status === "CREATED" || contest?.status === "RUNNING"),
[contest?.status, contest?.private, contest?.id]
)

const joinContestEnabled = useMemo(
Expand Down Expand Up @@ -291,9 +291,11 @@ export const ContestDetails = () => {
? `$${commify(getTotalRewards(contest))}`
: `${commify(getTotalRewards(contest))} USDC`}
</Text>
<Text variant="secondary" size="small">
Maximum Payout
</Text>
{contest.id === 38 && (
<Text variant="secondary" size="small">
Maximum Payout
</Text>
)}
</Row>
</Column>
</Column>
Expand All @@ -313,24 +315,34 @@ export const ContestDetails = () => {
) : null}
</Column>
<Column spacing="s">
<Text variant="secondary" strong>{`${commify(contest.prizePool)} USDC`}</Text>
<Text variant="secondary" strong>
{`${contest.id === 38 ? "$" : ""}${commify(contest.prizePool)} ${
contest.id !== 38 ? "USDC" : "(*)"
}`}
</Text>
<Text variant="secondary" strong>{`${commify(contest.leadSeniorAuditorFixedPay)} USDC`}</Text>
{contest.judgingPrizePool ? (
<Text variant="secondary" strong>{`${commify(contest.judgingPrizePool)} USDC`}</Text>
<Text variant="secondary" strong>{`${contest.id === 38 ? "$" : ""}${commify(
contest.judgingPrizePool
)} ${contest.id !== 38 ? "USDC" : ""}`}</Text>
) : null}
</Column>
</Row>
{contest.id === 38 && (
<Text variant="secondary" size="small">
&#8531; USDC and &#8532; OP tokens
(*) &#8531; USDC and &#8532; OP tokens
</Text>
)}
</Column>
</Row>
<hr />
<Row spacing="s" alignment={["start", "center"]}>
<FaCrown title="Lead Senior Watson" />
<Text strong>{contest.leadSeniorAuditorHandle ?? "TBD"}</Text>
{contest.id === 38 ? (
<Text strong>obront + Trust</Text>
) : (
<Text strong>{contest.leadSeniorAuditorHandle ?? "TBD"}</Text>
)}
</Row>
<hr />
<Row>
Expand Down Expand Up @@ -456,7 +468,7 @@ export const ContestDetails = () => {
)}

{!contest.private && (
<Column>
<Column spacing="xs">
<Text>
{contest.status === "CREATED" || contest.status === "RUNNING"
? "You're competing for:"
Expand Down