Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gh110 integrating timer for pop up #126

Merged
merged 3 commits into from
Oct 15, 2024

Conversation

riv-k
Copy link
Contributor

@riv-k riv-k commented Oct 15, 2024

Context

Closes

What Changed?

  • integrated timer to popUpNotif.
  • using sessionStorage to ensure that the notification appears once per session

How To Review

Testing

If theres an event that STARTS in 7 days then it should popup at the start of the session.
and then it wont popup again, so you can go between pages and back to the passport page and it wont show up again.

Items in sessionStorage decay (get deleted) if you close the tab, so if you close the tab and re-open it, the notification will show up again.

Risks

I've put the check thingy inside one of the useEffect hooks, and the hook is being run twice (idky), so if you close the notification too quickly, there's a chance it'll show up again, this only happens the first time you enter the passport page and close the notification straight away. It wont re-appear more than twiceeee.

Notes

@riv-k riv-k linked an issue Oct 15, 2024 that may be closed by this pull request
3 tasks
@derogative404 derogative404 self-requested a review October 15, 2024 07:25
Copy link
Member

@derogative404 derogative404 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@derogative404 derogative404 merged commit f9648fa into main Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integrating timer for Pop up
3 participants