mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-20 16:01:18 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
14
apps/yaak-client/hooks/useSidebarHidden.ts
Normal file
14
apps/yaak-client/hooks/useSidebarHidden.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useAtomValue } from 'jotai';
|
||||
import { activeWorkspaceIdAtom } from './useActiveWorkspace';
|
||||
import { useKeyValue } from './useKeyValue';
|
||||
|
||||
export function useSidebarHidden() {
|
||||
const activeWorkspaceId = useAtomValue(activeWorkspaceIdAtom);
|
||||
const { set, value } = useKeyValue<boolean>({
|
||||
namespace: 'no_sync',
|
||||
key: ['sidebar_hidden', activeWorkspaceId ?? 'n/a'],
|
||||
fallback: false,
|
||||
});
|
||||
|
||||
return [value, set] as const;
|
||||
}
|
||||
Reference in New Issue
Block a user