From bd0e8a290ca5e38dbd614ed5c53b86838bd24f9f Mon Sep 17 00:00:00 2001 From: mohandast52 Date: Fri, 6 Dec 2024 21:46:03 +0530 Subject: [PATCH] fix: add missing braces for conditional checks in AgentNotRunningButton and StakingRewardsThisEpoch components --- .../MainPage/header/AgentButton/AgentNotRunningButton.tsx | 3 ++- .../sections/RewardsSection/StakingRewardsThisEpoch.tsx | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx b/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx index c21469ff2..8c5d4021c 100644 --- a/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx +++ b/frontend/components/MainPage/header/AgentButton/AgentNotRunningButton.tsx @@ -108,8 +108,9 @@ export const AgentNotRunningButton = () => { !isNil(hasEnoughServiceSlots) && !hasEnoughServiceSlots && !isServiceStaked - ) + ) { return false; + } const masterSafeOlasBalance = masterSafeBalances?.find( (walletBalanceResult) => diff --git a/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx b/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx index 74165493f..d88812f1f 100644 --- a/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx +++ b/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx @@ -53,12 +53,15 @@ export const StakingRewardsThisEpoch = () => { const popoverContent = useMemo(() => { if (!isActiveStakingProgramLoaded) return ; - if (!activeStakingProgramMeta) + + if (!activeStakingProgramMeta) { return (
You're not yet in a staking program!
); + } + return (
The epoch for {stakingProgramMeta?.name} ends each day at ~{' '}