You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue with the Dark/Light Mode toggle in my Next.js app (using the app directory) while developing locally. When I select "Light Mode" and then reload the browser, it resets to "System" instead of remembering my previous selection.
This behavior seems to only occur during local development; when the site is hosted on Vercel in a production build, the selection is retained as expected.
To Reproduce
Start the Next.js app in development mode.
Switch to "Light Mode."
Reload the browser.
Expected behavior
The selected mode (e.g., "Light Mode") should persist across browser reloads.
Which versions of Sanity are you using?
@sanity/cli (global) 3.56.0 (latest: 3.62.2)
@sanity/image-url 1.0.2 (up to date)
@sanity/ui 2.8.10 (up to date)
@sanity/vision 3.62.2 (up to date)
sanity 3.62.2 (up to date)
What operating system are you using?
macOS sonoma
Which versions of Node.js / npm are you running?
10.5.0
v21.7.2
Additional context
I am unsure which version this change occurred in, but I distinctly remember that my selection was being remembered in the past.
As a side note, it would be beneficial to have an option in the Sanity config to set the default for the Dark/Light Mode.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm experiencing an issue with the Dark/Light Mode toggle in my Next.js app (using the app directory) while developing locally. When I select "Light Mode" and then reload the browser, it resets to "System" instead of remembering my previous selection.
This behavior seems to only occur during local development; when the site is hosted on Vercel in a production build, the selection is retained as expected.
To Reproduce
Expected behavior
The selected mode (e.g., "Light Mode") should persist across browser reloads.
Which versions of Sanity are you using?
@sanity/cli (global) 3.56.0 (latest: 3.62.2)
@sanity/image-url 1.0.2 (up to date)
@sanity/ui 2.8.10 (up to date)
@sanity/vision 3.62.2 (up to date)
sanity 3.62.2 (up to date)
What operating system are you using?
macOS sonoma
Which versions of Node.js / npm are you running?
10.5.0
v21.7.2
Additional context
The text was updated successfully, but these errors were encountered: