From 23a6a036bfed7532ddcc6f16ab48f49e88287b58 Mon Sep 17 00:00:00 2001 From: GeorginaShall Date: Fri, 27 Dec 2024 11:26:08 +0200 Subject: [PATCH] overall-home+scroll+back-on-mobile --- src/components/stakingCalculator.tsx | 2 +- src/components/stakingPoolCard.tsx | 10 ++--- src/components/stakingPoolDetailsView.tsx | 4 +- src/components/stakingPoolsList.tsx | 8 ++-- src/components/unstakingCalculator.tsx | 2 +- src/components/withdrawUnstakedZilPanel.tsx | 16 ++++--- src/components/withdrawZilView.tsx | 11 +++-- src/pages/index.tsx | 48 ++++++++++++++++----- 8 files changed, 67 insertions(+), 34 deletions(-) diff --git a/src/components/stakingCalculator.tsx b/src/components/stakingCalculator.tsx index 450622c..8635548 100644 --- a/src/components/stakingCalculator.tsx +++ b/src/components/stakingCalculator.tsx @@ -206,7 +206,7 @@ const StakingCalculator: React.FC = () => { } {stakeContractCallError && ( -
+
{stakeContractCallError.message}
)} diff --git a/src/components/stakingPoolCard.tsx b/src/components/stakingPoolCard.tsx index 804c6c7..7d3695a 100644 --- a/src/components/stakingPoolCard.tsx +++ b/src/components/stakingPoolCard.tsx @@ -49,7 +49,7 @@ const StakingPoolCard: React.FC = ({ {stakingPoolData.definition.tokenSymbol}
-
+
{userStakingPoolData && userStakingPoolData.stakingTokenAmount ? ( <> @@ -60,7 +60,7 @@ const StakingPoolCard: React.FC = ({ )} ${stakingPoolData.definition.tokenSymbol}`} ) : ( - - + - )}
= ({ { stakingPoolData.data ? (
= 50 ? 'text-red1' : stakingPoolData.data.votingPower * 100 >= 30 @@ -90,7 +90,7 @@ const StakingPoolCard: React.FC = ({
) : ( <> - VP + VP ) @@ -108,7 +108,7 @@ const StakingPoolCard: React.FC = ({ }
-
+
APR{' '} { stakingPoolData.data ? ( diff --git a/src/components/stakingPoolDetailsView.tsx b/src/components/stakingPoolDetailsView.tsx index 1b911d2..11008f1 100644 --- a/src/components/stakingPoolDetailsView.tsx +++ b/src/components/stakingPoolDetailsView.tsx @@ -74,8 +74,8 @@ const StakingPoolDetailsView: React.FC = ({ const humanReadableStakingToken = (value: bigint) => formatUnitsToHumanReadable(value, stakingPoolData.definition.tokenDecimals); return ( -
diff --git a/src/components/stakingPoolsList.tsx b/src/components/stakingPoolsList.tsx index 40f8a95..57ff5d4 100644 --- a/src/components/stakingPoolsList.tsx +++ b/src/components/stakingPoolsList.tsx @@ -50,11 +50,11 @@ const StakingPoolsList: React.FC = () => { return ( <> -
+
Liquid Validators
-
+
{ />
-
+
{sortedStakingPoolsData.map(({ stakingPool, userData }) => ( {
{unstakeContractCallError && ( -
+
{unstakeContractCallError.message}
)} diff --git a/src/components/withdrawUnstakedZilPanel.tsx b/src/components/withdrawUnstakedZilPanel.tsx index 708b69c..faf0e2a 100644 --- a/src/components/withdrawUnstakedZilPanel.tsx +++ b/src/components/withdrawUnstakedZilPanel.tsx @@ -65,12 +65,16 @@ const WithdrawZilPanel: React.FC = ({ >
{stakingPoolData.data ? ( -
- {parseFloat( - formatUnits(item.zilAmount, 18) - ).toFixed(3)}{' '} - ZIL -
+
+
+ {parseFloat( + formatUnits(item.zilAmount, 18) + ).toFixed(3)}{' '} + ZIL +
+
avZIL
+ +
) : (
)} diff --git a/src/components/withdrawZilView.tsx b/src/components/withdrawZilView.tsx index 683792d..2be2c56 100644 --- a/src/components/withdrawZilView.tsx +++ b/src/components/withdrawZilView.tsx @@ -22,20 +22,23 @@ const WithdrawZilView: React.FC = () => { ] return ( -
-
+
+

Staking Portal Claims

-

+

Below are withdrawal claims waiting for you

{ unstakingItems.length > 0 ? ( -
{ unstakingItems.map((item, claimIdx) => ( diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 3bf4d07..b6ce788 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -48,7 +48,7 @@ const HomePage = () => { const [mobileShowClaims, setMobileShowClaims] = useState(false); const mobileOverlayWrapper = (children: React.ReactNode) => ( -
+
{children}
) @@ -59,7 +59,8 @@ const HomePage = () => { !isWalletConnected ? ( ) : stakingPoolForView ? ( -
+
{ selectStakingPoolForView(null); @@ -105,14 +106,14 @@ const HomePage = () => { ) const mobileBottomNavition = ( -
+
{ isWalletConnected ? ( <> { mobileShowClaims && ( -
+
+ ) } +
+ {connectWallet} +
+ + ) - } + })
) @@ -187,7 +212,7 @@ const HomePage = () => {
{/* Header */} -
+
@@ -233,10 +258,11 @@ const HomePage = () => {
-
-
+
+
{/* Left column */} -
+