(fix): remove unused dependencies
(fix): remove dead code (fix): remove unused exports
This commit is contained in:
parent
2a8fade420
commit
be56080ba1
29 changed files with 168 additions and 338 deletions
14
apps/web/src/routes/app/useShowMobileNavbar.ts
Normal file
14
apps/web/src/routes/app/useShowMobileNavbar.ts
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import { useLocation, useMatches } from "@tanstack/react-router";
|
||||
|
||||
export function useShowMobileNavbar(): boolean {
|
||||
const matches = useMatches();
|
||||
const location = useLocation();
|
||||
|
||||
return matches.some(
|
||||
(match) =>
|
||||
match.pathname === location.pathname &&
|
||||
// Router staticData is app-defined and not typed by the route matcher here.
|
||||
// @ts-expect-error App route metadata
|
||||
match.staticData?.showMobileNavbar === true,
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue