'use client' import { useTheme } from 'next-themes'; import { useEffect, useState } from 'react'; import { SunIcon, MoonIcon } from '@phosphor-icons/react'; export const ThemeToggle = () => { const [mounted, setMounted] = useState(false); const { theme, setTheme } = useTheme(); useEffect(() => { setMounted(true); }, []); if (!mounted) return null; const isDark = theme === 'dark'; return ( ); };