-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement switch list using useNavigate #48
Conversation
Visit the preview URL for this PR (updated for commit 85e995b): https://tcl-60-smart-shopping-list--pr48-switchtoken-sgja818g.web.app (expires Sat, 03 Jun 2023 13:59:10 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 93ba99965233232f14cf05d9d95de4adc510bd3b |
Problem: |
Even when I click on Home it's redirecting to /list not to / |
Main trouble is / is being redirected to /list |
Use clearListToken function to clear local storage.
Solution to the aforementioned problem:Previously, the token was being directly removed from localStorage instead of utilizing setListToken() to update the list token state. This caused a mismatch between the localStorage and the state. When The problem has been addressed by creating a clearListToken function in the app which sets listToken to null. The clearListToken runs when |
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.
Looks good!
Draft PR to discuss an alternative implementation for Switch List