diff --git a/frontend/src/Cabinet/components/Common/DarkModeToggleSwitch.tsx b/frontend/src/Cabinet/components/Common/DarkModeToggleSwitch.tsx index 2694a3a42..fa6ce1633 100644 --- a/frontend/src/Cabinet/components/Common/DarkModeToggleSwitch.tsx +++ b/frontend/src/Cabinet/components/Common/DarkModeToggleSwitch.tsx @@ -22,9 +22,12 @@ const DarkModeToggleSwitch = ({ id }: { id: string }) => { ); const isDarkMode = displayStyleType === DisplayStyleType.DARK; + const toggleType = + (localStorage.getItem("display-style-toggle") as DisplayStyleToggleType) || + DisplayStyleToggleType.DEVICE; useEffect(() => { - setDisplayStyleToggle(savedDisplayStyleToggle); + setDisplayStyleToggle(toggleType); }, []); useEffect(() => {