-
Notifications
You must be signed in to change notification settings - Fork 0
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
Proll 158/dark mode changing #8
Conversation
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.
<div className="bg-neutralLight-neutral90 rounded-[2rem] md:min-w-[36.225rem] overflow-hidden"> | ||
<div className="bg-neutralLight-neutral90 dark:bg-neutralDark-neutral90 rounded-[2rem] md:min-w-[36.225rem] overflow-hidden"> | ||
<Image | ||
height={283} | ||
width={343} |
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.
@@ -5,7 +5,7 @@ import solutionsTexts from "@/data/solutionsSectionTexts"; | |||
const SolutionsSection = ({ version }) => { | |||
const { title } = solutionsTexts[version]; | |||
return ( | |||
<section className="bg-neutralLight-neutral10 w-full flex justify-center"> | |||
<section className="bg-neutralLight-neutral10 dark:bg-neutralDark-neutral90 w-full flex justify-center"> | |||
<div className="pt-[5.88rem] pb-[5.88rem] md:pt-[7.75rem] md:pb-[7.75rem] flex flex-col justify-center items-center gap-11 max-w-[49.375rem]"> | |||
<h4 className="text-neutralLight-neutral100 h2SB xl:h2 justify-center items-center text-center"> | |||
{title} |
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.
@@ -3,7 +3,7 @@ import React from "react"; | |||
const RoundedRectangle = () => { | |||
return ( | |||
<div className="relative w-full h-[2rem] md:h-[6.25rem] bg-neutralLight-neutral10"> |
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.
const [darkMode, setDarkMode] = useState(true); | ||
|
||
useEffect(() => { | ||
const theme = localStorage.getItem("theme"); | ||
if (theme === "dark") setDarkMode(true); | ||
}, []); | ||
|
||
useEffect(() => { | ||
if (darkMode) { | ||
document.documentElement.classList.add("dark"); | ||
localStorage.setItem("theme", "dark"); | ||
} else { | ||
document.documentElement.classList.remove("dark"); | ||
localStorage.setItem("theme", "light"); | ||
} | ||
}, [darkMode]); |
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 code uses LocalStorage, but when the page is refreshed, dark mode is set as the default. So it looks like there is a problem somewhere in the logic 🤔
|
…ogos in TechnologiesSection- darkMode
@roszcz , please take a look when you have a moment, at the CustomSolutions subpage and the icons in Our technologies. They appear a little differently than in Figma in DarkMode, but they are visible. Should it stay like this, or should I change it to preserve the color? |
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.
Icons look good for me, I think we can keep redis as is 👍 |
Tasks:
Please remember that there was design update, which I'm going to do in next task:)
task link
Done:)