From 643211efc9a4b7307acf8db5e0ed0c3e2e2a7126 Mon Sep 17 00:00:00 2001 From: Uncle Fatso Date: Wed, 25 Mar 2026 15:41:57 +0300 Subject: [PATCH] update left mnu panel Signed-off-by: Uncle Fatso --- package.json | 2 +- src/components/Sidebar/NavContent.jsx | 83 +++++++++++---------------- 2 files changed, 36 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index f46dcdb..f92ccfc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ghost-dao-interface", "private": true, - "version": "0.6.9", + "version": "0.6.10", "type": "module", "scripts": { "dev": "vite", diff --git a/src/components/Sidebar/NavContent.jsx b/src/components/Sidebar/NavContent.jsx index be8de60..5358ae3 100644 --- a/src/components/Sidebar/NavContent.jsx +++ b/src/components/Sidebar/NavContent.jsx @@ -1,4 +1,4 @@ -import React from "react"; +import { useMemo } from "react"; import "./Sidebar.scss"; @@ -41,6 +41,7 @@ import WrapIcon from "../Icon/WrapIcon"; import { isNetworkAvailable, isNetworkLegacy, isGovernanceAvailable } from "../../constants"; import { AVAILABLE_DEXES } from "../../constants/dexes"; +import { GATEKEEPER_ADDRESSES } from "../../constants/addresses"; import { ECOSYSTEM } from "../../constants/ecosystem"; import { DecimalBigNumber } from "../../helpers/DecimalBigNumber"; import { sortBondsByDiscount, formatCurrency } from "../../helpers"; @@ -51,7 +52,6 @@ import ShowerIcon from '@mui/icons-material/Shower'; import WifiProtectedSetupIcon from '@mui/icons-material/WifiProtectedSetup'; import { useTokenSymbol } from "../../hooks/tokens"; -import { useFtsoPrice, useGhstPrice, useGhostedSupplyPrice } from "../../hooks/prices"; import { useLiveBonds } from "../../hooks/bonds/index"; import pckg from "../../../package.json" @@ -69,13 +69,15 @@ const StyledBox = styled(Box)(({ theme }) => ({ const NavContent = ({ chainId, addressChainId }) => { const { liveBonds: ghostBonds } = useLiveBonds(chainId); - const ftsoPrice = useFtsoPrice(chainId); - const ghstPrice = useGhstPrice(chainId); - const ghostedSupplyPrice = useGhostedSupplyPrice(chainId); - const { symbol: ftsoSymbol } = useTokenSymbol(chainId, "FTSO"); const { symbol: ghstSymbol } = useTokenSymbol(chainId, "GHST"); + const bridgeNumbers = useMemo(() => { + const connectedNetworks = Object.keys(GATEKEEPER_ADDRESSES).length; + const number = 1 + connectedNetworks * 3; + return `(${number}, ${number})`; + }, [chainId]); + return ( @@ -92,17 +94,6 @@ const NavContent = ({ chainId, addressChainId }) => { Version {pckg.version} - - - {ftsoSymbol} Price: {formatCurrency(ftsoPrice, 2)} - - - {ghstSymbol} Price: {formatCurrency(ghstPrice, 2)} - - - GHOSTed Supply: {formatCurrency(ghostedSupplyPrice, 2)} - - @@ -114,14 +105,35 @@ const NavContent = ({ chainId, addressChainId }) => { {isNetworkAvailable(chainId, addressChainId) && <> - {isNetworkLegacy(chainId) - ? - : - } + 1 && + {AVAILABLE_DEXES[chainId].map((dex, index) => { + return ( + + + + {dex.name} v2 + + + ) + })} + + } + /> + @@ -154,32 +166,7 @@ const NavContent = ({ chainId, addressChainId }) => { } /> - - {AVAILABLE_DEXES[chainId].map((dex, index) => { - return ( - - - - {dex.name} v2 - - - ) - })} - - } - /> - - + {isGovernanceAvailable(chainId, addressChainId) && }