significant refactor

This commit is contained in:
2025-08-30 01:42:23 -05:00
parent 7136f646a3
commit 052f53444e
106 changed files with 1994 additions and 1701 deletions

View File

@@ -7,15 +7,15 @@ const useAppShellHeight = () => {
const { header } = useRouterConfig();
const height = useMemo(() => {
const appShellBottomPadding = isMobile ? '70px' : '0px';
const pageBottomPadding = '20px';
const mobileNavbar = isMobile && !header.collapsed ? '4rem' : '0px';
const pullablePadding = '1.285rem';
const appShellBottomPadding = isMobile ? "70px" : "0px";
const pageBottomPadding = "20px";
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, header.collapsed]);
return height;
}
};
export default useAppShellHeight;

View File

@@ -1,6 +1,6 @@
import { useMediaQuery } from "@mantine/hooks";
export const useIsMobile = () => {
const isMobile = useMediaQuery('(max-width: 48em)');
return isMobile;
}
const isMobile = useMediaQuery("(max-width: 48em)");
return isMobile;
};

View File

@@ -9,7 +9,7 @@ export function useSheet(options: UseSheetOptions = {}) {
const open = useCallback(() => setIsOpen(true), []);
const close = useCallback(() => setIsOpen(false), []);
const toggle = useCallback(() => setIsOpen(prev => !prev), []);
const toggle = useCallback(() => setIsOpen((prev) => !prev), []);
return {
isOpen,
@@ -19,6 +19,6 @@ export function useSheet(options: UseSheetOptions = {}) {
props: {
opened: isOpen,
onChange: setIsOpen,
}
},
};
}
}