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