'use client'; import { MoonIcon, SunIcon } from '@heroicons/react/24/outline'; import { useTheme } from 'next-themes'; import { useTranslations } from 'next-intl'; import { useEffect, useState } from 'react'; import { Button } from '@/components/ui/button'; const NavThemeToggle = () => { const { theme, setTheme } = useTheme(); const t = useTranslations('Theme'); const [mounted, setMounted] = useState(false); useEffect(() => { setMounted(true); }, []); if (!mounted) return null; return ( ); }; export default NavThemeToggle;