From 91f2bf1a1041d625537f3d4945762f3b8aeef15f Mon Sep 17 00:00:00 2001 From: leifu Date: Tue, 18 Jul 2023 01:43:06 +0300 Subject: [PATCH] Fix: Hide step 2 if the user has no escrowed entries (#2617) * Hide step 2 if the user has no escrowed entries * Update the banner link --- packages/app/src/constants/announcement.ts | 4 ++-- .../src/sections/dashboard/Stake/MigrationSteps.tsx | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/app/src/constants/announcement.ts b/packages/app/src/constants/announcement.ts index 7bb8202b3..d307f3cc4 100644 --- a/packages/app/src/constants/announcement.ts +++ b/packages/app/src/constants/announcement.ts @@ -5,9 +5,9 @@ export const BANNER_ENABLED = true // Sets the link destination for the banner component, or renders the banner as // plain, un-clickable text if set to a falsey value (`false`, `null`, '', etc...) export const BANNER_LINK_URL = - 'https://mirror.xyz/kwenta.eth/jCT9MCu_NpylWOQHUuzz25sbMFvR9W8RI_y_5mYYOhY' + 'https://mirror.xyz/kwenta.eth/xFomD0VE0H7o2sQ9zGeLyYPwCmtp8tLMXNTGtWy2UOQ' // Sets the text displayed on the home page banner -export const BANNER_TEXT = 'StakingV2 - Migration Postponed' +export const BANNER_TEXT = 'Staking V2 - Reverse Migration' // Sets the height of the banner component on desktop export const BANNER_HEIGHT_DESKTOP = 50 // Sets the height of the banner component on mobile diff --git a/packages/app/src/sections/dashboard/Stake/MigrationSteps.tsx b/packages/app/src/sections/dashboard/Stake/MigrationSteps.tsx index c1522aad1..513385c4d 100644 --- a/packages/app/src/sections/dashboard/Stake/MigrationSteps.tsx +++ b/packages/app/src/sections/dashboard/Stake/MigrationSteps.tsx @@ -50,6 +50,7 @@ const MigrationSteps: FC = memo(() => { onClick: handleUnstakeKwenta, active: stakedKwentaBalanceV2.gt(0), loading: isUnstakingKwenta, + visible: true, }, { key: 'step-2', @@ -60,6 +61,7 @@ const MigrationSteps: FC = memo(() => { onClick: handleVest, active: stakedKwentaBalanceV2.eq(0) && totalVestableV2.gt(0), loading: isVestingEscrowedRewards, + visible: totalVestableV2.gt(0), }, ], [ @@ -75,8 +77,9 @@ const MigrationSteps: FC = memo(() => { return ( - {migrationSteps.map( - ({ key, copy, label, value, buttonLabel, active, onClick, loading }, i) => ( + {migrationSteps + .filter(({ visible }) => visible) + .map(({ key, copy, label, value, buttonLabel, active, onClick, loading }, i) => ( { - ) - )} + ))} ) })