'use client'; import { useEffect, useState } from 'react'; import { useTheme } from 'next-themes'; import { FiMoon, FiSun } from 'react-icons/fi'; export function ThemeToggle() { const { theme, setTheme } = useTheme(); const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); if (!mounted) { return null; } const next = theme === 'dark' ? 'light' : 'dark'; const isDark = theme === 'dark'; return ( ); }