Skip to content

Commit 9933959

Browse files
authored
Merge pull request #64 from HSLdevcom/DT-6515
DT-6515 Add exact path matching to fix routing issue
2 parents 91ced5f + a22c547 commit 9933959

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/App.jsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ export default () => {
1111
<BrowserRouter basename="/graphiql">
1212
<Routes>
1313
<Route path="*" element={<Navigate to={DEFAULT_PATH} />} />
14-
<Route path="/:router" element={<DefaultApiRoute />}>
15-
<Route
16-
path={`/:router/${API_VERSION_1}`}
17-
element={<Version1ApiRoute />}
18-
/>
19-
<Route
20-
path={`/:router/${API_VERSION_2}/:dialect/:dialectVersion`}
21-
element={<Version2ApiRoute />}
22-
/>
23-
</Route>
14+
<Route path="/:router" element={<DefaultApiRoute />} exact />
15+
<Route
16+
path={`/:router/${API_VERSION_1}`}
17+
element={<Version1ApiRoute />}
18+
exact
19+
/>
20+
<Route
21+
path={`/:router/${API_VERSION_2}/:dialect/:dialectVersion`}
22+
element={<Version2ApiRoute />}
23+
exact
24+
/>
2425
</Routes>
2526
</BrowserRouter>
2627
);

0 commit comments

Comments
 (0)