Files
TheGame/packages/web/lib/store.ts
δυς f5295c3242 Reading and Writing Profile Info From Ceramic (#943)
This is being merged for further testing so as to not block the progress of `develop` & not require more rebases.
2022-01-25 16:51:53 -05:00

13 lines
391 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);
};