JiyaGupta-cs / ShopNex

React Ecommerce App
https://shopnex.vercel.app
90 stars 189 forks source link

BUG 🐞: Dark mode gets turned off on refeshing page #472

Open aslams2020 opened 3 months ago

aslams2020 commented 3 months ago

Hey @JiyaGupta-cs, Here is the issue i encountered - The dark mode preference does not persist across page refreshes. Each time the page is refreshed, the mode resets to the default instead of maintaining the user-selected mode (dark or light). I think it is due to the theme state is not being persisted when the page is refreshed.

To Reproduce Steps to reproduce the behavior:

Expected behavior

The selected dark or light mode should persist across page refreshes. If a user selects dark mode, the page should remain in dark mode even after refreshing.

Screenshots

Before refreshing the page looks like(currently in dark mode) :

image

After refreshing the page :

image

I hope I was able to explain the issue and the expected solution. If so, Could you please assign this issue to me under GSSoC 24?

aslams2020 commented 3 months ago

@JiyaGupta-cs Could you please take a look to the issue I raised. I'll look forward to contribute to your project.