diff --git a/app/layout.tsx b/app/layout.tsx index 72e1582..f1e9c9a 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -50,8 +50,7 @@ export default function RootLayout({ {children} diff --git a/components/ui/theme-toggle.tsx b/components/ui/theme-toggle.tsx index 289be39..94beaa8 100644 --- a/components/ui/theme-toggle.tsx +++ b/components/ui/theme-toggle.tsx @@ -11,10 +11,10 @@ import { Moon, Sun } from "lucide-react"; import { useTheme } from "next-themes"; const ThemeToggle = () => { - const { theme, setTheme } = useTheme(); + const { resolvedTheme, setTheme } = useTheme(); const handleTheme = () => { - if (theme == "light") { + if (resolvedTheme == "light") { setTheme("dark"); } else { setTheme("light");