Skip to content

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

@aslams2020

Description

@aslams2020

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:

  • Go to the website.
  • Toggle the dark mode switch to change the theme.
  • Refresh the page.
  • Observe that the theme reverts to the default mode instead of retaining the selected mode.

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?

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