(fix): remove unused dependencies
Some checks failed
/ build-desktop (linux) (push) Failing after 52s
/ build-web (push) Failing after 1m3s
/ build-mobile (push) Failing after 1m6s
/ release (push) Has been skipped

(fix): remove dead code
(fix): remove unused exports
This commit is contained in:
Alois 2026-06-03 14:53:18 +02:00
commit be56080ba1
29 changed files with 168 additions and 338 deletions

View file

@ -2,17 +2,12 @@ import { type ReactNode } from "react";
import Sidebar from "@/components/sidebar";
import Navbar, { MobileNavbar } from "@/components/navbar";
import { useShowMobileNavbar } from "./useShowMobileNavbar";
import { useIsMobile, cn, SidebarProvider } from "@tensamin/ui";
import { isTauri } from "@tauri-apps/api/core";
import { useLocation, useMatches } from "@tanstack/react-router";
/**
* Executes Layout.
* @param props Parameter props.
* @returns unknown.
*/
export default function Layout({ children }: { children: ReactNode }) {
const isMobile = useIsMobile();
const showMobileNavbar = useShowMobileNavbar();
@ -47,17 +42,3 @@ export default function Layout({ children }: { children: ReactNode }) {
</div>
);
}
export function useShowMobileNavbar(): boolean {
const matches = useMatches();
const location = useLocation();
const value = matches.some(
(match) =>
match.pathname === location.pathname &&
// @ts-expect-error Stuff
match.staticData?.showMobileNavbar === true,
);
return value;
}

View 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,
);
}