Better sidebar collapse, debuonce container uqeries, fix recent requests

This commit is contained in:
Gregory Schier
2024-02-15 15:07:15 -08:00
parent fe4696daf7
commit b7d9f0bf92
10 changed files with 36 additions and 28 deletions

View File

@@ -4,7 +4,7 @@ import { useActiveWorkspaceId } from './useActiveWorkspaceId';
export function useSidebarWidth() {
const activeWorkspaceId = useActiveWorkspaceId();
const [width, setWidth] = useLocalStorage<number>(`sidebar_width::${activeWorkspaceId}`, 220);
const resetWidth = useCallback(() => setWidth(220), [setWidth]);
const [width, setWidth] = useLocalStorage<number>(`sidebar_width::${activeWorkspaceId}`, 250);
const resetWidth = useCallback(() => setWidth(250), [setWidth]);
return useMemo(() => ({ width, setWidth, resetWidth }), [width, setWidth, resetWidth]);
}