diff --git a/src/App.js b/src/App.js index cbe79b08..66817686 100644 --- a/src/App.js +++ b/src/App.js @@ -17,51 +17,51 @@ import Navbar from './Components/Navbar.js' export default function App() { - const [isLoading, setIsLoading] = useState(false); - const [isSubmit, setIsSubmit] = useState(false); - const [isInvalid, setIsInvalid] = useState(false); + const [isLoading, setIsLoading] = useState(false); + const [isSubmit, setIsSubmit] = useState(false); + const [isInvalid, setIsInvalid] = useState(false); - const [, updateState] = useState(); - const forceUpdate = useCallback(() => updateState({}), []); + const [, updateState] = useState(); + const forceUpdate = useCallback(() => updateState({}), []); - useEffect(() => { - if (localStorage.getItem("pk-darkmode")) { - document.body.classList.add('dark-mode') - } - else { - document.body.classList.remove('dark-mode') - } - forceUpdate(); + useEffect(() => { + if (localStorage.getItem("pk-darkmode")) { + document.body.classList.add('dark-mode') + } + else { + document.body.classList.remove('dark-mode') + } + forceUpdate(); }, []); - return ( -
- - -
- - - - { !localStorage.getItem('token') || isInvalid ? : - } - - - - - - - - - - - -