From 415adf4e685e446212c8fe5068ef26b9c7506a8e Mon Sep 17 00:00:00 2001 From: 2nthony Date: Wed, 20 Nov 2024 18:49:39 +0800 Subject: [PATCH] fix: split loading effects for different tokens in totalTreasury component #1403 --- .../pages/Overview/polkadot/totalTreasury.jsx | 27 ++++++++++++------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/site/src/pages/Overview/polkadot/totalTreasury.jsx b/site/src/pages/Overview/polkadot/totalTreasury.jsx index c7ce8ccdd..4dd8a28c7 100644 --- a/site/src/pages/Overview/polkadot/totalTreasury.jsx +++ b/site/src/pages/Overview/polkadot/totalTreasury.jsx @@ -135,17 +135,24 @@ export default function OverviewTotalTreasury() { totalMythTokenValue, ).toString(); - const isLoading = + const isDotLoading = relayChainAssetsBalance.isLoading || hydration.isLoading || bountiesTotalBalance.isLoading || - fellowshipSalaryUsdtBalance.isLoading || fellowshipTreasuryDotBalance.isLoading || - loansCentrifugeUsdcBalance.isLoading || loansBifrostDotBalance.isLoading || - loansPendulumDotBalance.isLoading || - mythTokenAssetsBalance.isLoading || - isFiatPriceLoading; + loansPendulumDotBalance.isLoading; + + const isUSDtLoading = + hydration.isLoading || fellowshipSalaryUsdtBalance.isLoading; + + const isUSDCLoading = + hydration.isLoading || loansCentrifugeUsdcBalance.isLoading; + + const isMYTHLoading = mythTokenAssetsBalance.isLoading; + + const isLoading = + isDotLoading || isUSDtLoading || isUSDCLoading || isMYTHLoading; return ( @@ -166,7 +173,7 @@ export default function OverviewTotalTreasury() { >