Skip to content

Commit

Permalink
Fix flair settings, take 3
Browse files Browse the repository at this point in the history
Well, I seem to be requiring more sleep.
  • Loading branch information
MonkeyDo committed Dec 18, 2024
1 parent f2c7754 commit 9250216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions frontend/js/src/settings/flairs/FlairsSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export default function FlairsSettings() {
);
const values = await response.text();
const [shouldNag, daysLeft] = values.split(",");
setFlairUnlocked(!shouldNag);
setUnlockDaysLeft(Math.min(Number(daysLeft), 0));
setFlairUnlocked(!Number(shouldNag));
setUnlockDaysLeft(Math.max(Number(daysLeft), 0));
} catch (error) {
// eslint-disable-next-line no-console
console.error("Could not fetch nag status:", error);
Expand Down

0 comments on commit 9250216

Please sign in to comment.