From 1f2290f263be6a10fafdf8f4864abfa69639f594 Mon Sep 17 00:00:00 2001
From: "gpt-engineer-app[bot]"
<159125892+gpt-engineer-app[bot]@users.noreply.github.com>
Date: Wed, 22 Apr 2026 18:18:35 +0000
Subject: [PATCH] Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
---
src/routes/clients.$clientId.tsx | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/src/routes/clients.$clientId.tsx b/src/routes/clients.$clientId.tsx
index 8ac375b..34e0f9f 100644
--- a/src/routes/clients.$clientId.tsx
+++ b/src/routes/clients.$clientId.tsx
@@ -1,4 +1,4 @@
-import { createFileRoute, Link, useNavigate } from "@tanstack/react-router";
+import { createFileRoute, Link, Outlet, useMatches, useNavigate } from "@tanstack/react-router";
import { useEffect, useState } from "react";
import { ProtectedLayout } from "@/components/protected-layout";
import { PageContainer, PageHeader } from "@/components/app-shell";
@@ -20,12 +20,23 @@ import { TrustAccountPanel } from "@/components/trust/trust-account-panel";
import { setArchived } from "@/lib/archive";
export const Route = createFileRoute("/clients/$clientId")({
- component: () => (
+ component: ClientDetailLayout,
+});
+
+function ClientDetailLayout() {
+ const matches = useMatches();
+ const hasChild = matches.some(
+ (m) => m.routeId !== "/clients/$clientId" && m.routeId.startsWith("/clients/$clientId/"),
+ );
+
+ if (hasChild) return ;
+
+ return (
- ),
-});
+ );
+}
function ClientDetail() {
const { clientId } = Route.useParams();