fix default theme icon
This commit is contained in:
@@ -8,7 +8,9 @@ export default function ThemeSwitcher() {
|
||||
const [theme, setTheme] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
setTheme(localStorage.getItem("theme"));
|
||||
const t = localStorage.getItem("theme");
|
||||
if(t) setTheme(t);
|
||||
else setTheme("light");
|
||||
}, []);
|
||||
|
||||
const switchTheme = () => {
|
||||
|
||||
Reference in New Issue
Block a user