router config changes

This commit is contained in:
yohlo
2025-08-26 22:47:25 -05:00
parent fcdb33a4b6
commit 75479be334
16 changed files with 87 additions and 101 deletions

View File

@@ -1,18 +1,19 @@
import { useMemo } from "react";
import { useIsMobile } from "./use-is-mobile";
import useHeaderConfig from "@/features/core/hooks/use-header-config";
import useRouterConfig from "@/features/core/hooks/use-router-config";
const useAppShellHeight = () => {
const isMobile = useIsMobile();
const headerConfig = useHeaderConfig();
const { header } = useRouterConfig();
const height = useMemo(() => {
const appShellBottomPadding = isMobile ? '70px' : '0px';
const pageBottomPadding = '20px';
const mobileNavbar = isMobile && !headerConfig.collapsed ? '4rem' : '0px';
const mobileNavbar = isMobile && !header.collapsed ? '4rem' : '0px';
const pullablePadding = '1.285rem';
return `calc(100dvh - var(--app-shell-header-height, 0px) - ${mobileNavbar} - ${pullablePadding} - ${appShellBottomPadding} - ${pageBottomPadding})`;
}, [isMobile, headerConfig.collapsed]);
}, [isMobile, header.collapsed]);
return height;
}