Separate floating sidebar hidden state

This commit is contained in:
Gregory Schier
2024-03-22 10:43:10 -07:00
parent e292235792
commit 00b1f90074
6 changed files with 57 additions and 42 deletions

View File

@@ -0,0 +1,13 @@
import { useActiveWorkspaceId } from './useActiveWorkspaceId';
import { useKeyValue } from './useKeyValue';
export function useFloatingSidebarHidden() {
const activeWorkspaceId = useActiveWorkspaceId();
const { set, value } = useKeyValue<boolean>({
namespace: 'no_sync',
key: ['floating_sidebar_hidden', activeWorkspaceId ?? 'n/a'],
fallback: false,
});
return [value, set] as const;
}