khushi-joshi-05 / Food-ordering-website

Foodie is a food ordering website that aims to provide users with a seamless experience for ordering food online, taking orders for pickup, and booking tables for dining in. The website showcases the quality and specialties of the food offered, along with a variety of services to cater to different user preferences.
https://foodies-ordering-website.netlify.app/
MIT License
184 stars 437 forks source link

Bug🪲 : Light mode gets turned off on refreshing a page #1245

Open Tejashri-Taral opened 2 months ago

Tejashri-Taral commented 2 months ago

Give a brief about the bug ✍️

Description: Here is the issue I encountered - The light 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.

**What is the expected behavior? 🤔**

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

**Provide step by step information reproduce the bug 📄**

Description: Steps to reproduce the behavior:

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

Are you contributing under any open-source program? GSSOC'24

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?

github-actions[bot] commented 2 months ago

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.