Skip to content

Dark Mode Setting Resets to Light Mode After Page Refresh #565

@sh4f3e

Description

@sh4f3e

Issue Description

The dark mode setting in ShopNex resets to light mode after the page is reloaded or refreshed. This issue disrupts the user experience, as users need to re-enable dark mode each time they revisit the site or refresh the page.

Steps to Reproduce

  1. Navigate to the ShopNex website.
  2. Enable dark mode.
  3. Refresh the page or reload the website.
  4. Observe that the dark mode setting reverts to light mode.

Expected Behavior

The dark mode setting should persist across page reloads and refreshes, maintaining the user's preference.

Actual Behavior

The dark mode setting resets to light mode after the page is refreshed.

Potential Cause:

This issue could be due to the dark mode preference not being stored correctly in local storage or not being retrieved properly when the page loads.

Environment:

Browser: (e.g., Chrome, Firefox)
Operating System: (e.g., Windows 10, macOS 11)
React Version: (e.g., 17.0.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions