localstorage

compressed-week-view
Francesco Minnocci 2 years ago
parent 2dda03dd8a
commit 360fa42606
Signed by untrusted user: BachoSeven
GPG Key ID: 2BE4AB7FDAD828A4

@ -103,9 +103,10 @@ const App = ({}) => {
setEventi(eventi) setEventi(eventi)
}, [source]) }, [source])
const [theme, setTheme] = useState("light") const [theme, setTheme] = useState(localStorage.getItem("theme") ?? "light")
document.body.classList.toggle("dark-mode", theme === "dark") document.body.classList.toggle("dark-mode", theme === "dark")
localStorage.setItem("theme", theme)
return ( return (
<> <>

Loading…
Cancel
Save