From d6bcee2ed50be32077a17beae2fb8f6060972155 Mon Sep 17 00:00:00 2001 From: ashwinkumaragurubaran Date: Wed, 5 Aug 2026 15:50:02 +0530 Subject: [PATCH] fix(router): derive basename from , not hardcoded /krishna_sales The mount path is set per-placement by the frontgen server's (/krishna-sales/ on qa). The hardcoded /krishna_sales basename didn't match, so the Router refused to render. Read it from the document base so one artifact serves any mount path. --- src/App.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 0faec1c..7566f61 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,10 +14,16 @@ function RootRedirect() { import { routeConfig } from './routesConfig' +// Mount path comes from the document the frontgen server writes at +// placement time (e.g. "/krishna-sales/"), so one built artifact serves any +// mount without a hardcoded slug. Falls back to "/" for local dev. +const routerBasename = + (document.querySelector('base')?.getAttribute('href') || '/').replace(/\/$/, '') || '/' + function App() { return ( - + } /> }>