Don't play theme change animation on page load
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
body {
|
||||
text-align: center;
|
||||
background-color: #eeeeee;
|
||||
transition: 0.3s background-color ease-out;
|
||||
}
|
||||
|
||||
.Row {
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user