From 193ec6c45aa5941b88ffbc2d703fed0d022c8ae6 Mon Sep 17 00:00:00 2001 From: MaryWylde Date: Fri, 19 Dec 2025 17:30:43 +0400 Subject: [PATCH] chore: add an exception of uxcp/ tested pages --- src/layouts/Layout.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/layouts/Layout.tsx b/src/layouts/Layout.tsx index 72b1687..3d5bc7c 100644 --- a/src/layouts/Layout.tsx +++ b/src/layouts/Layout.tsx @@ -35,8 +35,12 @@ export default function Layout({ children }: { children: React.ReactNode }) { const { savedPersonasTitles } = decisionTable[locale]; const { isUxcoreMobile } = useUCoreMobile()[1]; - const pathname = usePathname().replace(/\/+$/, ''); - const path = pathname.replace(/\/+$/, ''); + const pathName = usePathname() ?? ''; + + const pathnameWithBypass = /^\/uxcp\/+$/i.test(pathName) + ? '/uxcp/' + : pathName.replace(/\/+$/, ''); + const path = pathnameWithBypass.replace(/\/+$/, ''); const isUXCoreRoot = path === '/uxcore'; const isUXCoreNested = path.startsWith('/uxcore/');