mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 02:00:09 +00:00
ACTUALLY fix the dark mode
This commit is contained in:
parent
6f6a69c6de
commit
42331f7334
2 changed files with 4 additions and 4 deletions
|
|
@ -31,7 +31,7 @@ export default function App() {
|
||||||
else {
|
else {
|
||||||
document.body.classList.remove('dark-mode')
|
document.body.classList.remove('dark-mode')
|
||||||
}
|
}
|
||||||
forceUpdate();
|
forceUpdate();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import React, { useEffect } from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import * as BS from 'react-bootstrap'
|
import * as BS from 'react-bootstrap'
|
||||||
import Toggle from 'react-toggle'
|
import Toggle from 'react-toggle'
|
||||||
|
|
@ -11,11 +11,11 @@ const Navbar = ({ setIsSubmit, forceUpdate}) => {
|
||||||
function toggleDarkMode() {
|
function toggleDarkMode() {
|
||||||
if (localStorage.getItem("pk-darkmode")) {
|
if (localStorage.getItem("pk-darkmode")) {
|
||||||
localStorage.removeItem("pk-darkmode");
|
localStorage.removeItem("pk-darkmode");
|
||||||
document.body.classList.add('dark-mode')
|
document.body.classList.remove('dark-mode')
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
localStorage.setItem("pk-darkmode", "true");
|
localStorage.setItem("pk-darkmode", "true");
|
||||||
document.body.classList.remove('dark-mode')
|
document.body.classList.add('dark-mode')
|
||||||
}
|
}
|
||||||
forceUpdate();
|
forceUpdate();
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue