Skip to content

Commit c3ebb6b

Browse files
managerclaude
andcommitted
fix(layout): route-split _app so UX Core pages use UX Core's own Layout
Post-consolidation regression: every page was wrapped in @layouts/Layout (keepsimple parent Header), including /uxcore /uxcg /uxcat /uxcp /uxcore-api. UX Core has its own @uxcore/layouts/Layout (ToolHeader + UX Core nav) that was never reached. Switch on router.pathname inside _app.tsx: UX Core routes mount UX Core's Layout, everything else continues to mount keepsimple's Layout. No deeper context bridge yet; the safe-default Proxy on the UX Core GlobalContext keeps ToolHeader rendering even without a real Provider. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 72cb6b7 commit c3ebb6b

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

src/pages/_app.tsx

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import UXCoreLayoutShell from '@uxcore/layouts/Layout';
12
import { useRouter } from 'next/router';
23
import { SessionProvider } from 'next-auth/react';
34
import React, { useEffect, useRef, useState } from 'react';
@@ -226,6 +227,13 @@ function AppContent({ Component, pageProps: { session, ...pageProps } }: TApp) {
226227
};
227228
}, []);
228229

230+
const isUxcoreRoute =
231+
router.pathname.startsWith('/uxcore') ||
232+
router.pathname.startsWith('/uxcg') ||
233+
router.pathname.startsWith('/uxcat') ||
234+
router.pathname.startsWith('/uxcp') ||
235+
router.pathname.startsWith('/uxcore-api');
236+
229237
useEffect(() => {
230238
if (!accountData?.id || !accountData?.createdAt) return;
231239

@@ -297,9 +305,15 @@ function AppContent({ Component, pageProps: { session, ...pageProps } }: TApp) {
297305
preload="none"
298306
loop
299307
/>
300-
<Layout>
301-
<Component {...pageProps} />
302-
</Layout>
308+
{isUxcoreRoute ? (
309+
<UXCoreLayoutShell>
310+
<Component {...pageProps} />
311+
</UXCoreLayoutShell>
312+
) : (
313+
<Layout>
314+
<Component {...pageProps} />
315+
</Layout>
316+
)}
303317
</GlobalContext.Provider>
304318
</SessionProvider>
305319
);

0 commit comments

Comments
 (0)