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