-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(form-v2): instantiate emergency contact modal in AdminNavBar #4381
feat(form-v2): instantiate emergency contact modal in AdminNavBar #4381
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
// Remove logged in state from localStorage | ||
localStorage.removeItem(LOGGED_IN_KEY) | ||
// Event to let useLocalStorage know that key is being deleted. | ||
window.dispatchEvent(new Event(LOCAL_STORAGE_EVENT)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/justANote:
Not from your PR, but the working of LOCAL_STORAGE_EVENT
and useLocalStorage
seems a bit funny and inefficient 🤔. Every component which use useLocalStorage
(and specifies the key it cares about) take an action on all key changes. Storage events by right contain information about what changed, so listeners can take informed decisions.
Not a blocker to merge, maybe I'll have a chat with KarRui later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
might need to fix some stories, the workspace page stories are being hidden behind the modal. |
as discussed, the emergency contact modal doesnt show up bc the mock user already has a contact number, but the rollout announcement modal still appears. will open a separate issue for this #4460 |
Problem
The emergency contact modal should be instantiated in the AdminNavBar instead of the WorkSpacePage
Builds upon #4125
Closes #4110 , #4153 , #4317
Solution
This PR instantiates the emergency contact modal in the
AdminNavBar
. The emergency contact modal pops up if:Details:
emergencyContactKey
is deleted fromlocalStorage
upon logoutBreaking Changes
Before & After Screenshots
AFTER:
Tests
In sequence