From 37d420f8396b2ffce171b309f990e89bcc978f9f Mon Sep 17 00:00:00 2001 From: 0xmegalodon Date: Thu, 1 Feb 2024 23:49:08 +0700 Subject: [PATCH] update condition --- .../PublicSale/hourlyRewardButton/index.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/modules/PublicSale/hourlyRewardButton/index.tsx b/src/modules/PublicSale/hourlyRewardButton/index.tsx index f3f6d73f8..b2653d295 100644 --- a/src/modules/PublicSale/hourlyRewardButton/index.tsx +++ b/src/modules/PublicSale/hourlyRewardButton/index.tsx @@ -155,15 +155,15 @@ const HourlyRewardButton = ({ className }: any) => { return `Congrats! You Have Earned`; } else if (Number(dailyReward?.pending) > 0) { return `Your Estimated Reward`; - } else if (!dailyReward) { + } else if (rewardValue === 0) { return `Contribute early & earn extra $BVM`; } return `Today's Total Reward`; }, [rewardValue, dailyReward]); - const isBuy = useMemo(() => { - return !!dailyReward; - }, [dailyReward]); + const needBuy = useMemo(() => { + return rewardValue === 0 && Number(dailyReward?.pending || "0") === 0; + }, [rewardValue, dailyReward]); const generateLinkTweet = async () => { let code = ''; @@ -268,22 +268,22 @@ const HourlyRewardButton = ({ className }: any) => { {titleReward} { - isBuy && ( + !needBuy && ( - 0 ? s.claimable : '')}>{formatCurrency(rewardValue || dailyReward?.pending || currentDayReward, MIN_DECIMAL, MIN_DECIMAL, 'BTC', false)} BVM + {formatCurrency(rewardValue || dailyReward?.pending, MIN_DECIMAL, MIN_DECIMAL, 'BTC', false)} BVM ) } <> { - isBuy ? ( + !needBuy ? (