mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-01-22 12:48:04 -05:00
* upgraded storybook dependencies * upgraded web dependencies * updated timezone selector * upgrade chakra in metamaps * upgraded react-dnd in metamaps * upgraded framer-motion * fixed types in metamaps * upgraded eslint * upgraded lerna, husky and graphql * upgraded node version * removed metamaps package * fixed all eslint issues * ran yarn format to prettier format all files * updated lint-staged & husky scripts * add executable perms to pre-push scripts * updated yarn.lock * fixed eslint and moved chakra icons to ds * fixed emotion errors * removed extra useContext * update yarn.lock * upgraded more packages * removed unnecessary .huskyrc.json * lint fix
12 lines
390 B
TypeScript
12 lines
390 B
TypeScript
export const get = (key: string): string | null =>
|
|
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);
|
|
};
|