Skip to content

Commit

Permalink
Merge pull request #191 from TrustlessComputer/daily_reward
Browse files Browse the repository at this point in the history
update hourly reward
  • Loading branch information
0xmegalodon authored Feb 1, 2024
2 parents cefd251 + ac1bb58 commit 4e3c5a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/modules/PublicSale/hourlyReward/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const HourlyReward = () => {
return (REWARDS[currentDay.diffDay] as number) / 24;
}, [currentDay, REWARDS])

return null;
return (
<Flex className={s.container}>
<Flex justifyContent={"space-between"} alignItems={"center"}>
Expand Down
6 changes: 5 additions & 1 deletion src/modules/PublicSale/hourlyRewardButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const HourlyRewardButton = ({ className }: any) => {

const hourlyEndTime = useMemo(() => {
const res = dayjs.utc().set('minute', 30);
if (dayjs().utc().isAfter(res)) {
if (dayjs().utc().isBefore(res)) {
console.log('fadfa', res.get('hour'));
res.set('hour', res.get('hour') + 1);
}
if(isEnd) {
Expand All @@ -20,6 +21,9 @@ const HourlyRewardButton = ({ className }: any) => {
return res.toString();
}, [isEnd]);

console.log('dayjs.utc()', dayjs.utc().toString());
console.log('hourlyEndTime', hourlyEndTime);

return (
<Flex className={cx(s.container, className)}>
<Flex direction={"column"} justifyContent={"space-between"} flex={1}>
Expand Down

0 comments on commit 4e3c5a3

Please sign in to comment.