"use client"; import { useEffect, useState } from "react"; import { Moon, Sun } from "lucide-react"; import { useTheme } from "next-themes"; import { motion } from "framer-motion"; export function ThemeToggle() { const [mounted, setMounted] = useState(false); const { theme, setTheme } = useTheme(); // Wait for component to be mounted to avoid hydration mismatch useEffect(() => { setMounted(true); }, []); if (!mounted) { return