From b454518f4fee647273eeb5d53817af1cbbf81d85 Mon Sep 17 00:00:00 2001 From: Kobe Leenders Date: Tue, 3 Oct 2023 03:07:38 +0200 Subject: [PATCH] fix(mfi-v2-ui): small ui tweaks --- .../src/components/desktop/Earn/index.tsx | 54 ++++++------ .../src/components/mobile/EmissionsBanner.tsx | 2 +- .../MobileAccountSummary.tsx | 2 +- .../AssetCard/AssetCardHeader.tsx | 2 +- .../MobilePortfolioOverview.tsx | 2 +- .../SemiCircleProgress.tsx | 45 +++++----- .../marginfi-v2-ui/src/hooks/useEffectOnce.ts | 6 ++ apps/marginfi-v2-ui/src/pages/portfolio.tsx | 84 ++++++++++--------- 8 files changed, 104 insertions(+), 93 deletions(-) create mode 100644 apps/marginfi-v2-ui/src/hooks/useEffectOnce.ts diff --git a/apps/marginfi-v2-ui/src/components/desktop/Earn/index.tsx b/apps/marginfi-v2-ui/src/components/desktop/Earn/index.tsx index af09114573..9ff36b8efb 100644 --- a/apps/marginfi-v2-ui/src/components/desktop/Earn/index.tsx +++ b/apps/marginfi-v2-ui/src/components/desktop/Earn/index.tsx @@ -209,26 +209,26 @@ const Earn = () => { return ( <> -
-
-
-
- {connected && ( -
- Your total deposits: - - { - // Since users will only be able to deposit to the LIP, - // the balance of their account should match total deposits. - } - {usdFormatter.format(lipAccount?.getTotalBalance().toNumber() || 0)} - -
- )} -
-
+
+
+
+ {connected && ( +
+ Your total deposits: + + { + // Since users will only be able to deposit to the LIP, + // the balance of their account should match total deposits. + } + {usdFormatter.format(lipAccount?.getTotalBalance().toNumber() || 0)} + +
+ )} +
+
+
{ }, }} /> -
- -
+
-
+
FUNDS WILL BE LOCKED FOR:
@@ -291,7 +289,7 @@ const Earn = () => {
- {lipAccount && ( + {lipAccount?.deposits.length > 0 && ( <>
Your deposits @@ -470,7 +468,7 @@ const AssetSelection: FC = ({ whitelistedCampaigns, setSele const defaultCampaign = whitelistedCampaigns[0]; return ( - + = ({ whitelistedCampaigns, setSele value={campaign.publicKey.toBase58()} control={ = ({ whitelistedCampaigns, setSele /> } label={ -
+
{getTokenSymbol(campaign.bank, bankMetadataMap || {})}
= ({ children, spinning, disabled, return connected ? (