Skip to content

Commit

Permalink
[FE] HOTFIX: clean-up 함수 명시
Browse files Browse the repository at this point in the history
  • Loading branch information
gykoh42 committed Dec 19, 2024
1 parent 3df2085 commit 7950681
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ const DisplayStyleCardContainer = () => {
};

applyDisplayStyle();
addDarkModeListener(darkModeQuery, applyDisplayStyle);
const removeListener = addDarkModeListener(
darkModeQuery,
applyDisplayStyle
);
return removeListener;
}, [toggleType]);

return <DisplayStyleCard />;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,11 @@ const DarkModeToggleSwitch = ({ id }: { id: string }) => {
};

updateDisplayStyleType();
addDarkModeListener(darkModeQuery, updateDisplayStyleType);
const removeListener = addDarkModeListener(
darkModeQuery,
updateDisplayStyleType
);
return removeListener;
}, [toggleType]);

useEffect(() => {
Expand Down

0 comments on commit 7950681

Please sign in to comment.