Skip to content

Commit

Permalink
added suffic in other places
Browse files Browse the repository at this point in the history
  • Loading branch information
ingawei committed Sep 17, 2024
1 parent 0a4ebe5 commit 3e8bcf5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion web/lib/politics/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { getMultiBetPoints } from 'common/contract-params'
import { PolicyContractType, PolicyData } from 'web/public/data/policy-data'
import { mapValues } from 'lodash'
import { getBetPoints } from 'web/lib/supabase/bets'
import { CASH_SUFFIX } from 'common/envs/constants'

export const ELECTION_PARTY_CONTRACT_SLUG =
// 'which-party-will-win-the-2024-us-pr-f4158bf9278a'
Expand Down Expand Up @@ -48,7 +49,7 @@ export async function getElectionsPageProps() {

const specialContractSlugs = [
ELECTION_PARTY_CONTRACT_SLUG,
`${ELECTION_PARTY_CONTRACT_SLUG}--cash`,
`${ELECTION_PARTY_CONTRACT_SLUG}${CASH_SUFFIX}`,
'who-will-win-the-2024-us-presidenti-8c1c8b2f8964',
'who-will-win-the-2024-republican-pr-e1332cf40e59',
'who-will-win-the-2024-democratic-pr-47576e90fa38',
Expand Down
3 changes: 2 additions & 1 deletion web/pages/[username]/[contractSlug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from 'common/contract'
import { ContractMetric } from 'common/contract-metric'
import {
CASH_SUFFIX,
HOUSE_BOT_USERNAME,
SPICE_MARKET_TOOLTIP,
TWOMBA_ENABLED,
Expand Down Expand Up @@ -118,7 +119,7 @@ export async function getStaticProps(ctx: {
const manaContract = contract.siblingContractId
? await getContract(adminDb, contract.siblingContractId)
: null
const slug = manaContract?.slug ?? contractSlug.replace('--cash', '')
const slug = manaContract?.slug ?? contractSlug.replace(CASH_SUFFIX, '')

return {
redirect: {
Expand Down

0 comments on commit 3e8bcf5

Please sign in to comment.