import { useEffect, useState } from 'react' import { useTheme } from 'next-themes' export const SwitchTheme: React.FC = () => { const [mounted, setMounted] = useState(false) const { theme, setTheme } = useTheme() useEffect(() => { setMounted(true) }, []) if (!mounted) { return null } return ( <>