Closed AMS003010 closed 5 months ago
Congratulations, @AMS003010! 🎉 Thank you for creating your issue. Your contribution is greatly appreciated and we look forward to working with you to resolve the issue. Keep up the great work!
We will promptly review your changes and offer feedback. Keep up the excellent work! Kindly remember to check our contributing guidelines
Hey @AMS003010, how do you planning to solve this bug. Could you explain your approach?
The Theme Toggle
feature is working properly, the only issue is the initial value of the Theme
state not being set to dark
when the component loads (since dark
is the default theme). I propose to set the initial value of Theme
to dark
using a useEffect
hook as the component loads.
Yes, correct. Don't set the theme to dark make the theme as system one and according to that set the toggle. The reason is I am not trying to use useEffect because it will make component client Instead of server.
Hi @abhijeetnishal can you assign this issue to me too I am experienced in working with this tech stack and my approach is somewhat similar to above discussed
Hey @Srikar04, this issue is already assigned to @AMS003010. This is small issue doesn't require 2 contributers. Contribute to other issues good luck
@abhijeetnishal I have made the PR with the required changes, please do review it.
Closing this issue as completed.
Describe the bug When a person visits the website for the first time, its in
dark
mode but the toggle is set tolight
.To Reproduce Steps to reproduce the behavior:
light
even though it is indark
modeExpected behavior When the website is loaded, the initial theme is
dark
and the the Theme Toggle should also showdark
Screenshots When the website is initially visited for the first time a user 👇
It should look like this 👇
Desktop (please complete the following information):
Additional context This problem can be solved by the setting the
theme
state todark
as the component mounts. Please do assign me this issue under GSSOC'24