From a4b31b0cb3c26d8d07fdb15d0d18387ebfb078e9 Mon Sep 17 00:00:00 2001 From: Esdras Renan Date: Fri, 10 Oct 2025 12:05:04 -0300 Subject: [PATCH] fix(web): remove unused var in AppSidebar and drop ambient declaration for DetailLine (TS error) --- src/components/admin/machines/admin-machines-overview.tsx | 5 ++--- src/components/app-sidebar.tsx | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/admin/machines/admin-machines-overview.tsx b/src/components/admin/machines/admin-machines-overview.tsx index 5fe284f..1bdf47d 100644 --- a/src/components/admin/machines/admin-machines-overview.tsx +++ b/src/components/admin/machines/admin-machines-overview.tsx @@ -42,9 +42,8 @@ type MachineSoftware = { source?: string } -// Forward declaration to ensure props are known before JSX usage +// Props type for DetailLine (used below) type DetailLineProps = { label: string; value?: string | number | null; classNameValue?: string } -declare function DetailLine(props: DetailLineProps): JSX.Element type LinuxExtended = { lsblk?: unknown @@ -1340,7 +1339,7 @@ function MachineCard({ machine }: { machine: MachinesQueryItem }) { ) } -function DetailLine({ label, value, classNameValue }: { label: string; value?: string | number | null; classNameValue?: string }) { +function DetailLine({ label, value, classNameValue }: DetailLineProps) { if (value === null || value === undefined) return null if (typeof value === "string" && (value.trim() === "" || value === "undefined" || value === "null")) { return null diff --git a/src/components/app-sidebar.tsx b/src/components/app-sidebar.tsx index 847efab..c81fa55 100644 --- a/src/components/app-sidebar.tsx +++ b/src/components/app-sidebar.tsx @@ -106,7 +106,7 @@ const navigation: { versions: string[]; navMain: NavigationGroup[] } = { export function AppSidebar({ ...props }: React.ComponentProps) { const pathname = usePathname() - const { session, isLoading, isAdmin, isStaff, convexUserId } = useAuth() + const { session, isLoading, isAdmin, isStaff } = useAuth() const [isHydrated, setIsHydrated] = React.useState(false) React.useEffect(() => {