Skip to content

Commit

Permalink
web: Fix isNarrow overriding user-preference of navpane
Browse files Browse the repository at this point in the history
Signed-off-by: ChampionBuffalo <[email protected]>
  • Loading branch information
ChampionBuffalo1 authored and thecodrr committed Aug 27, 2024
1 parent 3547663 commit 3a23e4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/web/src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ function DesktopAppContents({ show, setShow }: DesktopAppContentsProps) {
const middlePane = useRef<ImperativePanelHandle>(null);

useEffect(() => {
setIsNarrow(isTablet);
const size = navPane.current?.getSize();
// Toggle `isNarrow` to true if panel size isn't set to narrow by user
setIsNarrow((size && size <= 5) || isTablet);
}, [isTablet]);

// useEffect(() => {
Expand Down

0 comments on commit 3a23e4f

Please sign in to comment.