mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-13 19:30:29 +02:00
Split codebase (#455)
This commit is contained in:
14
apps/yaak-client/hooks/useFloatingSidebarHidden.ts
Normal file
14
apps/yaak-client/hooks/useFloatingSidebarHidden.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useAtomValue } from "jotai";
|
||||
import { activeWorkspaceAtom } from "./useActiveWorkspace";
|
||||
import { useKeyValue } from "./useKeyValue";
|
||||
|
||||
export function useFloatingSidebarHidden() {
|
||||
const activeWorkspace = useAtomValue(activeWorkspaceAtom);
|
||||
const { set, value } = useKeyValue<boolean>({
|
||||
namespace: "no_sync",
|
||||
key: ["floating_sidebar_hidden", activeWorkspace?.id ?? "n/a"],
|
||||
fallback: false,
|
||||
});
|
||||
|
||||
return [value, set] as const;
|
||||
}
|
||||
Reference in New Issue
Block a user