"use client"; import * as React from "react"; import { useTheme } from "next-themes"; import { MoonIcon } from "lucide-react"; import { IconSunLow } from "@tabler/icons-react"; import { motion } from "framer-motion"; export function ModeToggle() { const { theme, setTheme } = useTheme(); const [isClient, setIsClient] = React.useState(false); React.useEffect(() => { setIsClient(true); console.log("Theme initialized:", theme); }, []); React.useEffect(() => { console.log("Theme changed to:", theme); }, [theme]); return ( isClient && ( ) ); }