Skip to content

Commit

Permalink
Reorder daily usage reset and daily reward
Browse files Browse the repository at this point in the history
  • Loading branch information
imkunet committed Mar 16, 2024
1 parent 98316b0 commit 43fac9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/BattlePass.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,14 @@ export const BattlePassProvider: ParentComponent = (props) => {
return;
}

reward(`🎉 daily login reward`, 300);

setBattlePass({
...battlePass(),
loginStreak: battlePass().loginStreak + 1,
dailyLimitUsage: 0,
});

reward(`🎉 daily login reward`, 300);

if (Date.now() - lastLoginTime > 1000 * 60 * 60 * 24) {
// break the streak
reward(`😭 login streak broken`, 10);
Expand Down

0 comments on commit 43fac9c

Please sign in to comment.