From 1fdcf5ba89ca91781ac8de9790ff392672c7401f Mon Sep 17 00:00:00 2001 From: 0xmegalodon Date: Thu, 1 Feb 2024 13:44:52 +0700 Subject: [PATCH] update hourly reward --- src/modules/PublicSale/hourlyReward/index.tsx | 5 ++--- src/modules/PublicSale/hourlyRewardButton/index.tsx | 12 ++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/modules/PublicSale/hourlyReward/index.tsx b/src/modules/PublicSale/hourlyReward/index.tsx index 5a155ca7b..d9970a3af 100644 --- a/src/modules/PublicSale/hourlyReward/index.tsx +++ b/src/modules/PublicSale/hourlyReward/index.tsx @@ -57,13 +57,12 @@ const HourlyReward = () => { return (REWARDS[currentDay.diffDay] as number) / 24; }, [currentDay, REWARDS]) - return null; return ( - + Hourly Reward - {formatCurrency(currentHourReward, MIN_DECIMAL, MIN_DECIMAL, 'BTC', false)} BVM + {formatCurrency(currentHourReward, 0, 0, 'BTC', false)} BVM diff --git a/src/modules/PublicSale/hourlyRewardButton/index.tsx b/src/modules/PublicSale/hourlyRewardButton/index.tsx index fd3e43d0a..9a768265a 100644 --- a/src/modules/PublicSale/hourlyRewardButton/index.tsx +++ b/src/modules/PublicSale/hourlyRewardButton/index.tsx @@ -9,10 +9,10 @@ const HourlyRewardButton = ({ className }: any) => { const [isEnd, setIsEnd] = React.useState(false); const hourlyEndTime = useMemo(() => { - const res = dayjs.utc().set('minute', 30); - if (dayjs().utc().isBefore(res)) { - console.log('fadfa', res.get('hour')); - res.set('hour', res.get('hour') + 1); + let res = dayjs.utc().set('minute', 30); + res = res.set('second', 0); + if (dayjs().utc().isAfter(res)) { + res = res.set('hour', res.get('hour') + 1); } if(isEnd) { setIsEnd(false); @@ -21,8 +21,8 @@ const HourlyRewardButton = ({ className }: any) => { return res.toString(); }, [isEnd]); - console.log('dayjs.utc()', dayjs.utc().toString()); - console.log('hourlyEndTime', hourlyEndTime); + // console.log('dayjs.utc()', dayjs.utc().toString()); + // console.log('hourlyEndTime', hourlyEndTime); return (