fix appshell height
This commit is contained in:
@@ -5,9 +5,14 @@ const useAppShellHeight = () => {
|
|||||||
const isMobile = useIsMobile();
|
const isMobile = useIsMobile();
|
||||||
const headerConfig = useHeaderConfig();
|
const headerConfig = useHeaderConfig();
|
||||||
|
|
||||||
const height = useMemo(() =>
|
const height = useMemo(() => {
|
||||||
`calc(100dvh - var(--app-shell-header-height, 0px) - ${isMobile && !headerConfig.collapsed ? '4rem' : '0px'} - 1.285rem)`,
|
const appShellBottomPadding = isMobile ? '70px' : '0px';
|
||||||
[isMobile, headerConfig.collapsed]);
|
const pageBottomPadding = '20px';
|
||||||
|
const mobileNavbar = isMobile && !headerConfig.collapsed ? '4rem' : '0px';
|
||||||
|
const pullablePadding = '1.285rem';
|
||||||
|
|
||||||
|
return `calc(100dvh - var(--app-shell-header-height, 0px) - ${mobileNavbar} - ${pullablePadding} - ${appShellBottomPadding} - ${pageBottomPadding})`;
|
||||||
|
}, [isMobile, headerConfig.collapsed]);
|
||||||
|
|
||||||
return height;
|
return height;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user