import { useEffect, useState } from 'react' const moonIcon = ( ) const sunIcon = ( ) export default function ThemeSwitcher() { const [darkmode, setDark] = useState(localStorage.getItem('theme') === 'dark') useEffect(() => { setTheme(darkmode ? 'dark' : 'light') }, [darkmode]) const changeTheme = () => { setDark(!darkmode) } const buttonColor = darkmode ? 'bg-gray-700' : 'bg-gray-200' return ( ) }