Don't play theme change animation on page load
This commit is contained in:
parent
d7e2f52f11
commit
33709ce9b5
|
@ -5,7 +5,6 @@
|
||||||
body {
|
body {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #eeeeee;
|
background-color: #eeeeee;
|
||||||
transition: 0.3s background-color ease-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Row {
|
.Row {
|
||||||
|
|
|
@ -36,6 +36,9 @@ function App() {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.body.className = dark ? "dark" : "";
|
document.body.className = dark ? "dark" : "";
|
||||||
|
setTimeout(() => {
|
||||||
|
document.body.style.transition = "0.3s background-color ease-out";
|
||||||
|
}, 1);
|
||||||
}, [dark]);
|
}, [dark]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue