From 3e8bcf50d378ba0ccbdc7eddb7ad2a6c54144f25 Mon Sep 17 00:00:00 2001 From: ingawei Date: Tue, 17 Sep 2024 14:31:06 -0700 Subject: [PATCH] added suffic in other places --- web/lib/politics/home.ts | 3 ++- web/pages/[username]/[contractSlug].tsx | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/web/lib/politics/home.ts b/web/lib/politics/home.ts index e1dd9700be..bca65a8662 100644 --- a/web/lib/politics/home.ts +++ b/web/lib/politics/home.ts @@ -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' @@ -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', diff --git a/web/pages/[username]/[contractSlug].tsx b/web/pages/[username]/[contractSlug].tsx index b8e4947d1c..d7dc9c0c36 100644 --- a/web/pages/[username]/[contractSlug].tsx +++ b/web/pages/[username]/[contractSlug].tsx @@ -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, @@ -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: {