From b3408b251c83e13b3ed7f4ead4c852c4a5aef1a7 Mon Sep 17 00:00:00 2001 From: bingyuyap Date: Sat, 31 Aug 2024 08:09:54 +0800 Subject: [PATCH] dashboard: add FT tab Signed-off-by: bingyuyap --- dashboard/src/components/FTMetrics.tsx | 28 ++++++++++++++++++++++++++ dashboard/src/components/Main.tsx | 25 +++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 dashboard/src/components/FTMetrics.tsx diff --git a/dashboard/src/components/FTMetrics.tsx b/dashboard/src/components/FTMetrics.tsx new file mode 100644 index 00000000..42f6b5fd --- /dev/null +++ b/dashboard/src/components/FTMetrics.tsx @@ -0,0 +1,28 @@ +import { Box, Divider, Typography } from '@mui/material'; +import { useNetworkContext } from '../contexts/NetworkContext'; +import { LookerDashboard } from './LookerDashboard'; + +function FTMetrics() { + const { currentNetwork } = useNetworkContext(); + if (currentNetwork.name === 'Mainnet') { + return ( + <> + + + + ); + } + // Unsupported because Swap Layer is not deployed on Testnet + return ( + <> + + FT Metrics are currently only supported in Mainnet + + + ); +} +export default FTMetrics; diff --git a/dashboard/src/components/Main.tsx b/dashboard/src/components/Main.tsx index cec78d7f..5974a696 100644 --- a/dashboard/src/components/Main.tsx +++ b/dashboard/src/components/Main.tsx @@ -14,6 +14,7 @@ import Home from './Home'; import NTTMetrics from './NTTMetrics'; import NetworkSelector from './NetworkSelector'; import Settings from './Settings'; +import FTMetrics from './FTMetrics'; function NavButton(props: any) { // fix for Invalid value for prop `navigate` on tag @@ -84,6 +85,27 @@ function NavLinks() { NTT + + + + + + FT + + ); } @@ -130,6 +152,9 @@ function Main() { + + +