Don't play theme change animation on page load

pull/43/head
Lynn 2022-01-17 23:43:36 +01:00
rodzic d7e2f52f11
commit 33709ce9b5
2 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -5,7 +5,6 @@
body {
text-align: center;
background-color: #eeeeee;
transition: 0.3s background-color ease-out;
}
.Row {

Wyświetl plik

@ -36,6 +36,9 @@ function App() {
useEffect(() => {
document.body.className = dark ? "dark" : "";
setTimeout(() => {
document.body.style.transition = "0.3s background-color ease-out";
}, 1);
}, [dark]);
return (