Skip to content

Dark/Light Mode switch not working properly. #61

Open

Description

@TarunVishwakarma1
Image

when the user visits the page and is already in dark mode the toggle switch remains in light mode and dont change the theme. If click twice it changes to light and then works normally.

This bug is due to react component mounting before the theme is checked.

To eliminate this useEffect would be fine with theme as dependency array, as useEffect only runs when the component is mounted.

Activity

  1. ad1tyayadav commented on Mar 18, 2025

    @ad1tyayadav

    Is this issue solved?

  2. TarunVishwakarma1 commented on Mar 18, 2025

    @TarunVishwakarma1
    ContributorAuthor

    I have raised a pr but it has been closed as the UI Revamp is peding. Please refer #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions