1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

copy, window check

This commit is contained in:
Matthias Kretschmann 2020-09-10 13:54:59 +02:00
parent 466f04c86d
commit acf233a77b
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 3 additions and 3 deletions

View File

@ -15,7 +15,7 @@ export default function Debug(): ReactElement {
defaultChecked={debug === true}
onChange={() => setDebug(!debug)}
/>
<FormHelp>Show geeky debug information in some places.</FormHelp>
<FormHelp>Show geeky information in some places.</FormHelp>
</li>
)
}

View File

@ -22,14 +22,14 @@ const localStorageKey = 'ocean-user-preferences'
function getLocalStorage() {
const storageParsed =
window !== undefined &&
typeof window !== undefined &&
JSON.parse(window.localStorage.getItem(localStorageKey))
return storageParsed
}
function setLocalStorage(values: UserPreferencesValue) {
return (
window !== undefined &&
typeof window !== undefined &&
window.localStorage.setItem(localStorageKey, JSON.stringify(values))
)
}