solve ssr bug
This commit is contained in:
parent
bceebbc31d
commit
c362ebf233
|
@ -9,7 +9,7 @@ export function useLocalStorageStringState(
|
|||
const state =
|
||||
typeof window !== 'undefined'
|
||||
? localStorage.getItem(key) || defaultState
|
||||
: ''
|
||||
: defaultState || ''
|
||||
|
||||
const [, notify] = useState(key + '\n' + state)
|
||||
|
||||
|
|
Loading…
Reference in New Issue