From 33ffb7447da96392f3913f98ae0a67f6fbfa23c2 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 1 May 2026 07:26:13 +0900 Subject: [PATCH] [#1017] Hide CMC rank references in test mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CMC ranks (≈ CMC #1900, etc.) are tied to prod FDV targets and meaningless alongside test-mode values ($7K–$50K). Conditional on AIRDROP_TEST_MODE so they only render in prod. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/airdrop/config.ts | 4 +++- src/components/airdrop/CampaignHero.tsx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/airdrop/config.ts b/lib/airdrop/config.ts index 1be474c..593d418 100644 --- a/lib/airdrop/config.ts +++ b/lib/airdrop/config.ts @@ -86,5 +86,7 @@ const PROD_CONFIG: AirdropConfig = { const mode = process.env.NEXT_PUBLIC_AIRDROP_MODE ?? "prod"; +export const AIRDROP_TEST_MODE = mode === "test"; + export const AIRDROP_CONFIG: AirdropConfig = - mode === "test" ? TEST_CONFIG : PROD_CONFIG; + AIRDROP_TEST_MODE ? TEST_CONFIG : PROD_CONFIG; diff --git a/src/components/airdrop/CampaignHero.tsx b/src/components/airdrop/CampaignHero.tsx index 166782a..d221dfc 100644 --- a/src/components/airdrop/CampaignHero.tsx +++ b/src/components/airdrop/CampaignHero.tsx @@ -3,6 +3,7 @@ import { useEffect, useMemo, useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { formatUsdValue } from "../../../lib/usd-price"; +import { AIRDROP_TEST_MODE } from "../../../lib/airdrop/config"; /* ─── Types ─── */ @@ -101,7 +102,7 @@ function buildMilestoneRows( unlockPlot, poolUsd: unlockPlot * price, burnPct: 100 - ms.pct, - cmcRank: CMC_RANKS[i] ?? null, + cmcRank: AIRDROP_TEST_MODE ? null : (CMC_RANKS[i] ?? null), isFull: ms.pct === 100, }; });