Restyle /tournaments page
This commit is contained in:
parent
97dcd7f7f8
commit
d94b777e92
|
@ -7,7 +7,6 @@ import {
|
||||||
import clsx from 'clsx'
|
import clsx from 'clsx'
|
||||||
import { Contract } from 'common/contract'
|
import { Contract } from 'common/contract'
|
||||||
import { Group } from 'common/group'
|
import { Group } from 'common/group'
|
||||||
import { formatLargeNumber } from 'common/util/format'
|
|
||||||
import dayjs, { Dayjs } from 'dayjs'
|
import dayjs, { Dayjs } from 'dayjs'
|
||||||
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
||||||
import timezone from 'dayjs/plugin/timezone'
|
import timezone from 'dayjs/plugin/timezone'
|
||||||
|
@ -33,39 +32,39 @@ type Tourney = {
|
||||||
title: string
|
title: string
|
||||||
url?: string
|
url?: string
|
||||||
blurb: string // actual description in the click-through
|
blurb: string // actual description in the click-through
|
||||||
award?: number
|
award?: string
|
||||||
endTime?: Dayjs
|
endTime?: Dayjs
|
||||||
groupId: string
|
groupId: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const Salem = {
|
// const Salem = {
|
||||||
title: 'CSPI/Salem Tournament',
|
// title: 'CSPI/Salem Tournament',
|
||||||
blurb:
|
// blurb:
|
||||||
'Forecasting contest - top 5 can become Salem Center’s next research fellow.',
|
// "Forecasting contest - top 5 can become Salem Center's next research fellow.",
|
||||||
url: 'https://salemcenter.manifold.markets/',
|
// url: 'https://salemcenter.manifold.markets/',
|
||||||
award: 25_000,
|
// award: 25_000,
|
||||||
} as const
|
// } as const
|
||||||
|
|
||||||
const tourneys: Tourney[] = [
|
const tourneys: Tourney[] = [
|
||||||
|
{
|
||||||
|
title: 'Cause Exploration Prizes',
|
||||||
|
blurb:
|
||||||
|
'Which new charity ideas will Open Philanthropy find most promising?',
|
||||||
|
award: 'M$100k',
|
||||||
|
endTime: toDate('Sep 9, 2022'),
|
||||||
|
groupId: 'cMcpBQ2p452jEcJD2SFw',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: 'Fantasy Football Stock Exchange',
|
title: 'Fantasy Football Stock Exchange',
|
||||||
blurb: 'How many points will each NFL player score?',
|
blurb: 'How many points will each NFL player score this season?',
|
||||||
award: 500,
|
award: '$2,500',
|
||||||
endTime: toDate('Jan 6, 2023'),
|
endTime: toDate('Jan 6, 2023'),
|
||||||
groupId: 'SxGRqXRpV3RAQKudbcNb',
|
groupId: 'SxGRqXRpV3RAQKudbcNb',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: 'Cause Exploration Prize',
|
|
||||||
blurb:
|
|
||||||
'Which new charity ideas will Open Philanthropy find most promising?',
|
|
||||||
award: 100_000,
|
|
||||||
endTime: toDate('Sep 9, 2022'),
|
|
||||||
groupId: 'znYsWa9eZRkBvSHwmaNz',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: 'Clearer Thinking Regrant Project',
|
title: 'Clearer Thinking Regrant Project',
|
||||||
blurb: 'Something amazing',
|
blurb: 'Something amazing',
|
||||||
award: 1_000_000,
|
award: '$10,000',
|
||||||
endTime: toDate('Sep 22, 2022'),
|
endTime: toDate('Sep 22, 2022'),
|
||||||
groupId: '2VsVVFGhKtIdJnQRAXVb',
|
groupId: '2VsVVFGhKtIdJnQRAXVb',
|
||||||
},
|
},
|
||||||
|
@ -106,9 +105,6 @@ export default function TournamentPage(props: {
|
||||||
description="Win money by betting in forecasting touraments on current events, sports, science, and more"
|
description="Win money by betting in forecasting touraments on current events, sports, science, and more"
|
||||||
/>
|
/>
|
||||||
<Col className="mx-4 sm:mx-10 xl:w-[125%]">
|
<Col className="mx-4 sm:mx-10 xl:w-[125%]">
|
||||||
<h1 className="my-4 text-2xl text-indigo-700">Tournaments</h1>
|
|
||||||
<Section {...Salem} markets={[]} />
|
|
||||||
|
|
||||||
{tourneys.map(({ groupId, ...data }) => (
|
{tourneys.map(({ groupId, ...data }) => (
|
||||||
<Section
|
<Section
|
||||||
key={groupId}
|
key={groupId}
|
||||||
|
@ -127,7 +123,7 @@ function Section(props: {
|
||||||
title: string
|
title: string
|
||||||
url: string
|
url: string
|
||||||
blurb: string
|
blurb: string
|
||||||
award?: number
|
award?: string
|
||||||
ppl?: number
|
ppl?: number
|
||||||
endTime?: Dayjs
|
endTime?: Dayjs
|
||||||
markets: Contract[]
|
markets: Contract[]
|
||||||
|
@ -135,18 +131,14 @@ function Section(props: {
|
||||||
const { title, url, blurb, award, ppl, endTime, markets } = props
|
const { title, url, blurb, award, ppl, endTime, markets } = props
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="my-4">
|
<div className="my-12">
|
||||||
<Link href={url}>
|
<Link href={url}>
|
||||||
<a className="group mb-3 flex flex-wrap justify-between">
|
<a className="group mb-3 flex flex-wrap justify-between">
|
||||||
<h2 className="text-xl font-semibold group-hover:underline">
|
<h2 className="text-xl font-semibold group-hover:underline md:text-3xl">
|
||||||
{title}
|
{title}
|
||||||
</h2>
|
</h2>
|
||||||
<Row className="items-center gap-4 whitespace-nowrap rounded-full bg-gray-200 px-6">
|
<Row className="my-2 items-center gap-4 whitespace-nowrap rounded-full bg-gray-200 px-6">
|
||||||
{!!award && (
|
{!!award && <span className="flex items-center">🏆 {award}</span>}
|
||||||
<span className="flex items-center">
|
|
||||||
🏆 ${formatLargeNumber(award)}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
{!!ppl && (
|
{!!ppl && (
|
||||||
<span className="flex items-center gap-1">
|
<span className="flex items-center gap-1">
|
||||||
<UsersIcon className="h-4" />
|
<UsersIcon className="h-4" />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user