fix default theme icon
This commit is contained in:
1 parent
50fda7076a
commit
417b9856ad
1 file changed
+3
-1
@@ -8,7 +8,9 @@ export default function ThemeSwitcher() {
|
|||||||
const [theme, setTheme] = useState("");
|
const [theme, setTheme] = useState("");
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setTheme(localStorage.getItem("theme"));
|
const t = localStorage.getItem("theme");
|
||||||
|
if(t) setTheme(t);
|
||||||
|
else setTheme("light");
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const switchTheme = () => {
|
const switchTheme = () => {
|
||||||
|
|||||||
Reference in new issue
Block a user