Description
The user data does not refresh automatically after invite, revoke, or decline actions. This issue causes the user interface to display outdated information. Currently, the workaround involves using window.location.reload(), which refreshes the entire page and leads to a poor user experience. The goal is to refresh only the relevant component and update the UI with the latest data.
Steps to Reproduce
Invite a guest:
Go to the card settings.
Add a guest by entering their email and clicking "invite".
Observe that the UI remains unchanged until the entire page is refreshed.
Revoke an invite:
Go to the card settings.
Revoke an existing invite.
Observe that the invite status remains unchanged until the entire page is refreshed.
Decline an invite:
Go to the card settings.
Decline an invite.
Observe that the invite status remains unchanged until the entire page is refreshed.
Expected Behavior
The user data should automatically refresh and update the UI to reflect the changes after performing invite, revoke, or decline actions without reloading the entire page.
Actual Behavior
The UI displays outdated information and requires a full page reload (window.location.reload()) to display the updated data.
Possible Solution
Use a custom hook to refresh the user data by fetching the latest data and updating the userDataAtom state. Call this hook after performing invite, revoke, or decline actions. Avoid using window.location.reload().
Description The user data does not refresh automatically after invite, revoke, or decline actions. This issue causes the user interface to display outdated information. Currently, the workaround involves using window.location.reload(), which refreshes the entire page and leads to a poor user experience. The goal is to refresh only the relevant component and update the UI with the latest data.
Steps to Reproduce
Invite a guest:
Revoke an invite:
Decline an invite:
Expected Behavior The user data should automatically refresh and update the UI to reflect the changes after performing invite, revoke, or decline actions without reloading the entire page.
Actual Behavior The UI displays outdated information and requires a full page reload (window.location.reload()) to display the updated data.
Possible Solution Use a custom hook to refresh the user data by fetching the latest data and updating the userDataAtom state. Call this hook after performing invite, revoke, or decline actions. Avoid using window.location.reload().