Don't revalidate user data when editing #181
Labels
p1
Urgent tasks
story:org-onboarding
Orgs can onboard, vet, and manage volunteer profiles
type:bug
Something isn't working in a story
To reproduce issue:
members
field in the local Firestore emulator).If you open up developer tools, you should be able to see an HTTP request that is sent when you refocus the edit user tab. This is because the
pages/[org]/users/[id]/edit.tsx
page uses SWR which automatically revalidates data when a page regains focus.Instead, you should disable SWR's automatic revalidation only if the user's data has been changed in the front-end but not yet updated in the back-end (i.e. if the user data has been changed but the "update user" button has yet to be clicked).
You can look for examples of how to implement this pattern in
components/calendar/index.tsx
which prevents revalidation while there are meetings that have been mutated.The text was updated successfully, but these errors were encountered: