solve ssr bug

This commit is contained in:
Maximilian Schneider 2021-04-25 20:35:49 +03:00
parent bceebbc31d
commit c362ebf233
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ export function useLocalStorageStringState(
const state =
typeof window !== 'undefined'
? localStorage.getItem(key) || defaultState
: ''
: defaultState || ''
const [, notify] = useState(key + '\n' + state)