Skip to content

Commit

Permalink
[FE] FIX: 토글 변경 후 까비와 수지회를 이동할 시 토글 적용 안되는 버그 해결 #1649
Browse files Browse the repository at this point in the history
  • Loading branch information
gykoh42 committed Dec 17, 2024
1 parent dfa5d9b commit c21ce67
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down

0 comments on commit c21ce67

Please sign in to comment.