diff --git a/src/main.jsx b/src/main.jsx index bdfdf52..8c45a03 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -103,9 +103,10 @@ const App = ({}) => { setEventi(eventi) }, [source]) - const [theme, setTheme] = useState("light") + const [theme, setTheme] = useState(localStorage.getItem("theme") ?? "light") document.body.classList.toggle("dark-mode", theme === "dark") + localStorage.setItem("theme", theme) return ( <>