-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat]: Added the dark/light theme #56
base: main
Are you sure you want to change the base?
Conversation
@mohit-bhandari45 is attempting to deploy a commit to the snipsavvy's projects Team on Vercel. A member of the Team first needs to authorize it. |
@mohit-bhandari45 what abt internal tool for dark/light theme functionality ? |
Means? |
src/app/page.tsx
Outdated
"use client" | ||
import { Button } from "@/components/LandingPage/Button"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can not make the page.tsx as a client component, as next js says it is a server side and should kept as server side only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be resloved!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can not make the page.tsx as a client component, as next js says it is a server side and should kept as server side only.
Actually I am using usestate and useeffect hooks in this file. So it need to be a client component as server components doesn't allow it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yaa, so in that case u should consider creating an another client component, and then should use here!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/app/page.tsx
Outdated
</section> | ||
<section className="w-full py-12 md:py-20 lg:pt-32 pb-24 bg-[#0E0E11] px-32"> | ||
<section className={`${theme === "true" ? "bg-[#0E0E11] text-gray-50" : "bg-[#ffffff] text-black"} w-full py-12 md:py-20 lg:pt-32 pb-24 px-32`}> | ||
<div className="container grid items-center justify-center gap-4 px-4 text-center md:px-6 lg:gap-10"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of having this check in all the classes, can't we have a better way of doing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, we have to make check in main divs, so that the classes adjust according to theme.
@mohit-bhandari45 we have an internal tool .. after login into the platform ! |
Hello @mohit-bhandari45 have some feedback for you regarding this PR, can you hmu at discord @chaitanya, you will find me in the project channel |
bro this is my linkedin |
Are you on discord? Message me there, trying to keep all project related stuff to discord, thanks |
You are not accepting requests |
this is mine :- mohit_bhandari_81404 |
Messaged you, check inbox |
@cb7chaitanya @sahilrohera10 |
@mohit-bhandari45 Just add a short clip showing your changes , just to ensure everything works fine |
Hey really sorry for the late reply. prev27.mp4 |
@cb7chaitanya @sahilrohera10 @yash-25log do check the demo video and review it. |
@cb7chaitanya @yash-25log @sahilrohera10 kindly please review this pr and update me |
Fixes #43
Description:-
So as I suggested, a dark/light mode feature. I have completed that. I have made a dark and light theme toggling.
Interestingly the local instance of your last time will also be saved and according to that, the theme will be changed.
I have followed the code and done no harm to the code.
Screenshots:-
![image](https://private-user-images.githubusercontent.com/151373021/336359445-48b726b0-5956-49ae-b508-4079ddd56c59.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODAzNTQsIm5iZiI6MTcyMDM4MDA1NCwicGF0aCI6Ii8xNTEzNzMwMjEvMzM2MzU5NDQ1LTQ4YjcyNmIwLTU5NTYtNDlhZS1iNTA4LTQwNzlkZGQ1NmM1OS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwN1QxOTIwNTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT04ZTE5MzE2OTU2ZjhlZjA4ODlkOTZlMDE2OTU1YTg1ZjExNWU0ZjUwMmUzMDU0NjEwNThhNzE5OGE0MDkxYjFjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.3Gc_Ir0iL6-OQ2GYJLXZ0RsWm_v8M2yViAkGbMMG7p8)
![image](https://private-user-images.githubusercontent.com/151373021/336359502-dc32af29-f9c4-443f-b530-9af4d1669186.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAzODAzNTQsIm5iZiI6MTcyMDM4MDA1NCwicGF0aCI6Ii8xNTEzNzMwMjEvMzM2MzU5NTAyLWRjMzJhZjI5LWY5YzQtNDQzZi1iNTMwLTlhZjRkMTY2OTE4Ni5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA3JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwN1QxOTIwNTRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hNTRkZDYzNDhiNGExZTY2OTE1MDZlZmFjNjQ2YmNkN2ViODhjYzYwMjE5NmVkZTMzZTJkYzg3NjIyYjE5Y2NhJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.5BuC1vcIhg32IC-x7kPNL22mTWgI-HcXjOW-vbO-KSI)
![image](https://private-user-images.githubusercontent.com/151373021/336359576-c9ffc1a8-8ae2-4626-aaa0-583bf54dba8b.png?jwt=eyJhbGciOiJIUzI1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Yzc4MGE5NzViN2U4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.R8CcTpgOJv03NXzyBIFb-efLg0ykJJSKiM5GkQa_Ac8)
Review this PR and label it accordingly.