diff options
author | Sebastian <sebasjm@gmail.com> | 2022-06-06 00:09:25 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-06-06 00:09:25 -0300 |
commit | fb6aff76d2152d95caa2ba6cb0d91cb01e0687fe (patch) | |
tree | 2dc9b0a4935f60ba7229fd81332ec4a41ad4698c /packages/taler-wallet-webextension/src/hooks/useLocalStorage.ts | |
parent | 912813fd09ee2f757e4d6d509a911159b46153a7 (diff) | |
download | wallet-core-fb6aff76d2152d95caa2ba6cb0d91cb01e0687fe.tar.xz |
prettier
Diffstat (limited to 'packages/taler-wallet-webextension/src/hooks/useLocalStorage.ts')
-rw-r--r-- | packages/taler-wallet-webextension/src/hooks/useLocalStorage.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/taler-wallet-webextension/src/hooks/useLocalStorage.ts b/packages/taler-wallet-webextension/src/hooks/useLocalStorage.ts index 31d54e451..ed0f1d2bb 100644 --- a/packages/taler-wallet-webextension/src/hooks/useLocalStorage.ts +++ b/packages/taler-wallet-webextension/src/hooks/useLocalStorage.ts @@ -25,13 +25,13 @@ export function useLocalStorage( key: string, initialValue?: string, ): [string | undefined, StateUpdater<string | undefined>] { - const [storedValue, setStoredValue] = useState<string | undefined>((): - | string - | undefined => { - return typeof window !== "undefined" - ? window.localStorage.getItem(key) || initialValue - : initialValue; - }); + const [storedValue, setStoredValue] = useState<string | undefined>( + (): string | undefined => { + return typeof window !== "undefined" + ? window.localStorage.getItem(key) || initialValue + : initialValue; + }, + ); const setValue = ( value?: string | ((val?: string) => string | undefined), |