Files
TheGame/packages/web/lib/store.ts
Pacien Boisson 0e3cc277f7 Fix mobile connect (#360)
* Tweak login flow

* Add connecting state and fix signing

* Fix URQL cache when switching account

* Lint
2021-03-15 21:16:47 +04:00

13 lines
402 B
TypeScript

export const get = (key: string): string | null => {
return typeof window === 'undefined' ? null : localStorage.getItem(key);
};
export const set = (key: string, value: string): void => {
if (typeof window === 'undefined') return;
localStorage.setItem(key, value);
};
export const remove = (key: string): void => {
if (typeof window === 'undefined') return;
localStorage.removeItem(key);
};