Bug fix.
This commit is contained in:
+1
-11
@@ -26,7 +26,7 @@ function App() {
|
||||
[lightMode, setLightMode] = useState(localStorage.getItem('light-mode') === 'true');
|
||||
|
||||
function SetLoader(x) {
|
||||
setLoader(x)
|
||||
setLoader(x);
|
||||
}
|
||||
|
||||
function handleNameCheckbox() {
|
||||
@@ -82,16 +82,6 @@ function App() {
|
||||
setNumberOfResults(filteredData.length);
|
||||
}, [filteredData]);
|
||||
|
||||
// useEffect(() => {
|
||||
// const isLight = localStorage.getItem("light-mode");
|
||||
|
||||
// if (JSON.parse(isLight)) {
|
||||
// setLightMode(true);
|
||||
// } else {
|
||||
// setLightMode(false);
|
||||
// }
|
||||
// }, []);
|
||||
|
||||
useEffect(() => {
|
||||
if (lightMode) {
|
||||
document.body.classList.add("light");
|
||||
|
||||
Reference in New Issue
Block a user