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

IS-3190: Hide alert and store in localstorage #618

Merged
merged 1 commit into from
Mar 25, 2025

Conversation

eirikdahlen
Copy link
Contributor

Hva har blitt lagt til✨🌈

Legger på en lukkenkapp, og trigger en lagring av tidsstempel i localstorage. Hvis det er mer enn 1 døgn siden denne, viser man alert.

Screenshots 📸✨

Screen.Recording.2025-03-21.at.13.46.46.mov

@eirikdahlen eirikdahlen requested a review from a team as a code owner March 21, 2025 12:47
@eirikdahlen eirikdahlen requested review from Copilot and removed request for a team March 21, 2025 12:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a feature to hide the alert component after it has been dismissed and stores the dismissal timestamp in localStorage so that the alert is only shown again after one day.

  • Adds localStorage support for the alert dismissal timestamp in Systemvarsel.tsx
  • Updates the alert component to include a close button that triggers the storage update
  • Introduces the HIDE_ALERT_DATE key in useLocalStorageState.ts to support this functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/components/Systemvarsel.tsx Implements a one-day delay for showing the alert after dismissal
src/hooks/useLocalStorageState.ts Adds a new storage key (HIDE_ALERT_DATE) for managing alert state

@eirikdahlen eirikdahlen merged commit f240006 into master Mar 25, 2025
3 checks passed
@eirikdahlen eirikdahlen deleted the IS-3190-hide-alert branch March 25, 2025 12:15
mariusfoss added a commit that referenced this pull request Mar 28, 2025
This reverts commit f240006.

Revert "IS-3191: Lagt til url for mer informasjon om varslingsfeil (#617)"

This reverts commit 11fb876.

Revert "IS-3179: Lagt til informasjon om forhåndsvarsler som ikke har blitt sendt ut (#616)"

This reverts commit daaa19f.
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.

2 participants