Skip to content

Commit

Permalink
fix: doc deploy basename
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeless0911 committed Dec 4, 2023
1 parent 7248b13 commit aa1ec12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions website/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const Container = styled.div`
min-height: 100vh;
`;

const BASENAME = process.env.NODE_ENV === 'development' ? '' : '/web-infra-QoS';

const App = () => {
const query = new URLSearchParams(window.location.search);
const initialProductIndex =
Expand All @@ -32,7 +34,7 @@ const App = () => {
window.history.replaceState(
null,
'',
`?product=${productIndex}&metrics=${menuIndex}`,
`${BASENAME}?product=${productIndex}&metrics=${menuIndex}`,
);
}, [productIndex, menuIndex]);

Expand All @@ -52,7 +54,7 @@ const App = () => {
};

return (
<Router>
<Router basename={BASENAME}>
<Container>
<NavBar />
<SideMenu
Expand Down

0 comments on commit aa1ec12

Please sign in to comment.