-
Notifications
You must be signed in to change notification settings - Fork 14
FIX : Changing settings requires refreshing the page to apply #490 #494
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Build fails for eslint errors |
|
Everything is good now I think ! |
|
There are still some checks failing, could you revert the changes in package-lock.json and try again? I'll check the code later today |
|
Check it now I think problem solved ! |
|
Now it only updates the smooth charts setting, it should update all settings. I tested a bit myself and you can move the useSettings hook into Dashboard.tsx and get rid of the |
|
i did some changes check them out when you're free and tell me if anything is not as needed , also what's the problem on the deployment here ? |
|
Type error, |
|
Hi @Eldemarkki , I’ve implemented the assignment check as discussed and tested it locally. |
|
I kept my focus on the settings changes we discussed (useSettings / removing getPreferences & DashboardWrapper). |
|
@fawez9 I will check it this evening when I have time |
|
I'll merge this now, thank you for your first contribution! |
This PR fixes the issue where changing a setting like smoothCharts didn’t update the dashboard until you refreshed the page.
I wrapped smoothCharts in React state at the provider level, so the dashboard now updates immediately when the setting changes. Cookies are still used to persist your preferences, and SSR continues to work as expected. I also added a small DashboardWrapper to make sure SSR props and client-side context stay in sync.
How to test: toggle smoothCharts in your settings — the dashboard updates instantly. Refresh the page, and the cookie keeps your preference.