mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 11:13:48 +02:00
Separate floating sidebar hidden state
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useMemo } from 'react';
|
||||
import { useActiveWorkspaceId } from './useActiveWorkspaceId';
|
||||
import { useKeyValue } from './useKeyValue';
|
||||
|
||||
@@ -10,12 +9,5 @@ export function useSidebarHidden() {
|
||||
fallback: false,
|
||||
});
|
||||
|
||||
return useMemo(() => {
|
||||
return {
|
||||
show: () => set(false),
|
||||
hide: () => set(true),
|
||||
toggle: () => set((h) => !h),
|
||||
hidden: value,
|
||||
};
|
||||
}, [set, value]);
|
||||
return [value, set] as const;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user