|
|
@ -103,11 +103,12 @@ const App = ({}) => {
|
|
|
|
setEventi(eventi)
|
|
|
|
setEventi(eventi)
|
|
|
|
}, [source])
|
|
|
|
}, [source])
|
|
|
|
|
|
|
|
|
|
|
|
const [theme, setTheme] = useState(localStorage.getItem("theme") ?? "light")
|
|
|
|
const [theme, setTheme] = useState(localStorage.getItem("theme") ?? (window.matchMedia('(prefers-color-scheme: dark)').matches ? "dark" : "light"))
|
|
|
|
|
|
|
|
|
|
|
|
document.body.classList.toggle("dark-mode", theme === "dark")
|
|
|
|
document.body.classList.toggle("dark-mode", theme === "dark")
|
|
|
|
localStorage.setItem("theme", theme)
|
|
|
|
localStorage.setItem("theme", theme)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<Toolbar
|
|
|
|
<Toolbar
|
|
|
|