fix deepscan issues
This commit is contained in:
parent
9f7452dcc7
commit
5841be88ea
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ function useLocalStorage(key, initialValue) {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const item = window.localStorage.getItem(prefix + key)
|
const item = window.localStorage.getItem(prefix + key)
|
||||||
if (item) {
|
if (item) {
|
||||||
setValue(item ? JSON.parse(item) : initialValue);
|
setValue(JSON.parse(item));
|
||||||
}
|
}
|
||||||
setReady(true);
|
setReady(true);
|
||||||
}, [])
|
}, [])
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import useLocalStorage from 'shared/hooks/useLocalStorage';
|
import useLocalStorage from 'shared/hooks/useLocalStorage';
|
||||||
import { useState, useEffect } from 'react'
|
import {useEffect } from 'react'
|
||||||
|
|
||||||
function useTheme() {
|
function useTheme() {
|
||||||
// make a local storage item for the theme
|
// make a local storage item for the theme
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue