mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
18 lines
324 B
TypeScript
18 lines
324 B
TypeScript
|
import { createLocalStorage } from 'utils/createLocalStorage';
|
||
|
|
||
|
interface IGlobalStore {
|
||
|
favorites?: boolean;
|
||
|
}
|
||
|
|
||
|
export const useGlobalLocalStorage = () => {
|
||
|
const { value, setValue } = createLocalStorage<IGlobalStore>(
|
||
|
'global:v1',
|
||
|
{}
|
||
|
);
|
||
|
|
||
|
return {
|
||
|
value,
|
||
|
setValue,
|
||
|
};
|
||
|
};
|