Skip to content

Commit eca697f

Browse files
committed
react router routing for prod config
1 parent 147f30b commit eca697f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

frontend/src/App.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ axios.defaults.baseURL = process.env.REACT_APP_PIMS_BACKEND_URL
1313
: 'http://localhost:' +
1414
(process.env.REACT_APP_PIMS_BACKEND_PORT ? process.env.REACT_APP_PIMS_BACKEND_PORT : '5051');
1515

16+
const basename = process.env.REACT_APP_VITE_BASE?.replace(/\/$/, '') || '';
17+
1618
function App() {
1719
return (
1820
<Box>
19-
<Router>
21+
<Router basename={basename}>
2022
<div className="App">
2123
<Container className="NavContainer" maxWidth="xl">
2224
<div className="containerg">

0 commit comments

Comments
 (0)