fix the darkmode AGAIN
This commit is contained in:
parent
8aecb235e9
commit
6f6a69c6de
@ -26,11 +26,9 @@ export default function App() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (localStorage.getItem("pk-darkmode")) {
|
if (localStorage.getItem("pk-darkmode")) {
|
||||||
localStorage.removeItem("pk-darkmode");
|
|
||||||
document.body.classList.add('dark-mode')
|
document.body.classList.add('dark-mode')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
localStorage.setItem("pk-darkmode", "true");
|
|
||||||
document.body.classList.remove('dark-mode')
|
document.body.classList.remove('dark-mode')
|
||||||
}
|
}
|
||||||
forceUpdate();
|
forceUpdate();
|
||||||
|
Loading…
Reference in New Issue
Block a user