Skip to content

Commit

Permalink
Merge pull request #251 from freelawproject/fix-EOY-dialog-condition
Browse files Browse the repository at this point in the history
fix(EOY_dialog): prevent first dialog from appearing after its end date.
  • Loading branch information
mlissner authored Dec 24, 2024
2 parents cbb32f2 + 636fd2c commit 826b7d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function EOYDialog() {
const secondEOYDialogDismissalDate = localStorage.getItem('secondEOYDialogDismissalDate');
const secondDismissed = dismissedWithinWeek(secondEOYDialogDismissalDate);

if (!firstDismissed && dialogStart <= today <= firstDialogEnd) {
if (!firstDismissed && dialogStart <= today && today <= firstDialogEnd) {
setDialogVersion('first');
setIsOpen(true);
} else if (!secondDismissed && firstDialogEnd <= today && today <= secondDialogEnd) {
Expand Down

0 comments on commit 826b7d8

Please sign in to comment.