mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-01 00:08:27 +01:00
19 lines
362 B
TypeScript
19 lines
362 B
TypeScript
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,
|
|
};
|
|
};
|