From 2234cb54fc5c39e25e0d7b1c4c0d4039c3cd77f5 Mon Sep 17 00:00:00 2001 From: Ben Senescu <44480372+bensenescu@users.noreply.github.com> Date: Fri, 8 May 2026 16:00:04 -0400 Subject: [PATCH] Show project nav on app pages (#171) --- src/client/layout/AppShell.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/client/layout/AppShell.tsx b/src/client/layout/AppShell.tsx index 39f5257..aff6d1b 100644 --- a/src/client/layout/AppShell.tsx +++ b/src/client/layout/AppShell.tsx @@ -20,6 +20,7 @@ import { signOutAndRedirect, useSession } from "@/lib/auth-client"; import { isHostedClientAuthMode } from "@/lib/auth-mode"; import { BILLING_ROUTE } from "@/shared/billing"; import { getSeoApiKeyStatus } from "@/serverFunctions/config"; +import { getOrCreateDefaultProject } from "@/serverFunctions/projects"; const DATAFORSEO_HELP_PATH = "/help/dataforseo-api-key"; const SUPPORT_PATH = "/support"; @@ -38,6 +39,12 @@ export function AuthenticatedAppLayout({ const setupModalRef = React.useRef(null); const [showMissingSeoApiKeyModal, setShowMissingSeoApiKeyModal] = React.useState(false); + const defaultProjectQuery = useQuery({ + queryKey: ["defaultProject"], + queryFn: () => getOrCreateDefaultProject(), + enabled: !projectId, + }); + const headerProjectId = projectId ?? defaultProjectQuery.data?.id ?? null; const shouldCheckSeoApiKeyStatus = location.pathname !== BILLING_ROUTE; const seoApiKeyStatusQuery = useQuery({ queryKey: ["seoApiKeyStatus"], @@ -106,7 +113,7 @@ export function AuthenticatedAppLayout({
setDrawerOpen(true)} /> @@ -120,7 +127,7 @@ export function AuthenticatedAppLayout({ setDrawerOpen(false)} > {children}