mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-06 05:19:05 -05:00
14 lines
391 B
TypeScript
14 lines
391 B
TypeScript
import { useActiveWorkspaceId } from './useActiveWorkspaceId';
|
|
import { useKeyValue } from './useKeyValue';
|
|
|
|
export function useSidebarHidden() {
|
|
const activeWorkspaceId = useActiveWorkspaceId();
|
|
const { set, value } = useKeyValue<boolean>({
|
|
namespace: 'no_sync',
|
|
key: ['sidebar_hidden', activeWorkspaceId ?? 'n/a'],
|
|
fallback: false,
|
|
});
|
|
|
|
return [value, set] as const;
|
|
}
|