-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Migrate to react-router-dom * Migrate to react-router-dom - part 2 * Address PR review comments Co-authored-by: Krithika Sundararajan <krithika.sundararajan@go-jek.com>
- Loading branch information
1 parent
36549c8
commit 8c50881
Showing
38 changed files
with
517 additions
and
440 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import { Navigate, Route, Routes } from "react-router-dom"; | ||
|
||
import { useConfig } from "config"; | ||
import ExperimentsLandingPage from "experiments/ExperimentsLandingPage"; | ||
import Home from "Home"; | ||
|
||
const App = () => { | ||
const { appConfig } = useConfig(); | ||
return ( | ||
<Routes> | ||
<Route path={appConfig.homepage} /> | ||
<Route index element={<Home />} /> | ||
<Route path="projects/:projectId"> | ||
<Route index element={<Navigate to="experiments" replace={true} />} /> | ||
<Route path="experiments/*" element={<ExperimentsLandingPage />} /> | ||
</Route> | ||
{/* DEFAULT */} | ||
<Route path="*" element={<Navigate to="/pages/404" replace={true} />} /> | ||
</Routes> | ||
); | ||
}; | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.