From 5d1038232bf19a55a158adaedc8447fef1b90d19 Mon Sep 17 00:00:00 2001 From: Mario Sarcevic Date: Thu, 15 Feb 2024 16:45:59 +0100 Subject: [PATCH] feat: Hide shimmer token claiming related graphs in "Statistics" on non-shimmer networks --- .../stardust/statistics/InfluxChartsTab.tsx | 56 ++++++++++--------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx b/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx index 82d8e9646..891aa51d3 100644 --- a/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx +++ b/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx @@ -10,10 +10,12 @@ import { idGenerator } from "~helpers/stardust/statisticsUtils"; import { formatAmount } from "~helpers/stardust/valueFormatHelper"; import NetworkContext from "../../../context/NetworkContext"; import { COMMAS_REGEX } from "../../../routes/stardust/landing/ShimmerClaimedUtils"; +import { SHIMMER } from "~/models/config/networkType"; import Modal from "../../Modal"; export const InfluxChartsTab: React.FC = () => { - const { tokenInfo } = useContext(NetworkContext); + const { name: networkName, tokenInfo } = useContext(NetworkContext); + const [ transactions, dailyBlocks, @@ -38,6 +40,8 @@ export const InfluxChartsTab: React.FC = () => { const ids = idGenerator(); + const isShimmerNetwork = networkName === SHIMMER; + return (
@@ -185,30 +189,32 @@ export const InfluxChartsTab: React.FC = () => { />
-
-
-

Genesis

- -
-
- - -
-
+ {isShimmerNetwork && ( +
+
+

Genesis

+ +
+
+ + +
+
+ )}

Data Storage