Skip to content

Commit 9e78f73

Browse files
authored
Merge pull request #21 from taiyou1116/fix/Inconsistent-theme-toggling
🐛 fix inconsistent theme toggling
2 parents f7f1926 + f5f577b commit 9e78f73

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/components/menu/Menu.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { setTheme } from "@/RTK/slices/themeSlice";
55
import { FiMoon } from "react-icons/fi";
66
import { RootState } from "@/RTK/store";
77
import { theme } from "@/utils/theme";
8-
import { useEffect } from "react";
98

109
import Image from "next/image";
1110
import Link from "next/link";
@@ -14,10 +13,6 @@ const Menu = () => {
1413
const { dark } = useSelector((state: RootState) => state.theme);
1514
const dispatch = useDispatch();
1615

17-
useEffect(() => {
18-
dispatch(setTheme(theme()));
19-
}, [dispatch]);
20-
2116
return (
2217
<nav className="w-full flex items-center justify-between p-1">
2318
<h1>

0 commit comments

Comments
 (0)