1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/frontend/src/hooks/useGlobalLocalStorage.ts

19 lines
363 B
TypeScript
Raw Normal View History

import { createLocalStorage } from 'utils/createLocalStorage';
interface IGlobalStore {
favorites?: boolean;
hiddenEnvironments?: Set<string>;
}
export const useGlobalLocalStorage = () => {
const { value, setValue } = createLocalStorage<IGlobalStore>(
'global:v1',
{},
);
return {
value,
setValue,
};
};