mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-02-12 23:14:57 -05:00
* Tweak login flow * Add connecting state and fix signing * Fix URQL cache when switching account * Lint
13 lines
402 B
TypeScript
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);
|
|
};
|