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

Avoid refreshing the page #318

Open
AltiMario opened this issue Feb 28, 2023 · 2 comments · Fixed by #341
Open

Avoid refreshing the page #318

AltiMario opened this issue Feb 28, 2023 · 2 comments · Fixed by #341
Assignees
Labels
enhancement New feature or request frontend For any issue that relates to frontend

Comments

@AltiMario
Copy link
Sponsor Member

It is quite common to switch wallets because users can have multiple profiles, but the problem is that old cached data always show up.
We need a way to remove (or at least reduce drastically) this annoying "memory" effect.

@AltiMario AltiMario added enhancement New feature or request frontend For any issue that relates to frontend labels Mar 3, 2023
@huzaifa-99
Copy link
Member

To add, we would need to do these changes

1- Remove all cache data. We cache data for most of the api calls, this is done by react query. Whenever a user logs out we need to remove this cache data.

This is a sample on how we invalidate cache

queryClient.invalidateQueries({ queryKey: ['creations'] });

2- The app state needs to be refreshed. We are using this hook for it.

Sample code

const { updateAppKey } = useAppKeys();

These 2 steps will fix the cache issue

@UmairMukhtar
Copy link
Member

when we open creation details it requires a reload it need to be fixed

@UmairMukhtar UmairMukhtar reopened this Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend For any issue that relates to frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
@AltiMario @UmairMukhtar @huzaifa-99 and others