From 8a95a00b76f8ef6fb1a11b8464496f021e6f534d Mon Sep 17 00:00:00 2001 From: Miles Zhang Date: Tue, 4 Jun 2024 11:44:24 +0800 Subject: [PATCH] feat: only mainnet show ckb_hodl_wave chart Signed-off-by: Miles Zhang --- src/pages/StatisticsChart/index.tsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/pages/StatisticsChart/index.tsx b/src/pages/StatisticsChart/index.tsx index 3eba8c10a3..a3e808240d 100644 --- a/src/pages/StatisticsChart/index.tsx +++ b/src/pages/StatisticsChart/index.tsx @@ -2,6 +2,7 @@ import { ReactNode } from 'react' import 'default-passive-events' import { useTranslation } from 'react-i18next' import Content from '../../components/Content' +import { isMainnet } from '../../utils/chain' import { DifficultyHashRateChart } from './mining/DifficultyHashRate' import { DifficultyUncleRateEpochChart } from './mining/DifficultyUncleRateEpoch' import { TransactionCountChart } from './activities/TransactionCount' @@ -211,11 +212,15 @@ const useChartsData = () => { chart: , path: '/charts/cell-count', }, - { - title: t('statistic.ckb_hodl_wave'), - chart: , - path: '/charts/ckb-hodl-wave', - }, + ...(isMainnet() + ? [ + { + title: t('statistic.ckb_hodl_wave'), + chart: , + path: '/charts/ckb-hodl-wave', + }, + ] + : []), { title: `${t('statistic.balance_ranking')}`, chart: ,