From d95d88cd23118f414017e4fb971b5d4e021bcdb8 Mon Sep 17 00:00:00 2001 From: Vincenzo Scamporlino Date: Fri, 3 Oct 2025 15:36:57 +0200 Subject: [PATCH] app: fix routing when PageExtensions are mounted on / Signed-off-by: Vincenzo Scamporlino --- plugins/app/src/extensions/AppRoutes.tsx | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/app/src/extensions/AppRoutes.tsx b/plugins/app/src/extensions/AppRoutes.tsx index 5cc3c3f4b8..ddd7962004 100644 --- a/plugins/app/src/extensions/AppRoutes.tsx +++ b/plugins/app/src/extensions/AppRoutes.tsx @@ -36,12 +36,18 @@ export const AppRoutes = createExtension({ factory({ inputs }) { const Routes = () => { const element = useRoutes([ - ...inputs.routes.map(route => ({ - path: `${route - .get(coreExtensionData.routePath) - .replace(/\/$/, '')}/*`, - element: route.get(coreExtensionData.reactElement), - })), + ...inputs.routes.map(route => { + const routePath = route.get(coreExtensionData.routePath); + + return { + path: + routePath === '/' + ? routePath + : `${routePath.replace(/\/$/, '')}/*`, + + element: route.get(coreExtensionData.reactElement), + }; + }), { path: '*', element: ,