Skip to content

Commit

Permalink
Updated homepage so that it exists at /home and anytime the path at "…
Browse files Browse the repository at this point in the history
…/" is visited, it redirects to "/home".
  • Loading branch information
anilnatha committed Dec 17, 2024
1 parent 336147b commit fea8c6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
Navigate,
Route,
Routes,
} from "react-router-dom"
Expand Down Expand Up @@ -28,7 +29,6 @@ function Root() {

useEffect(() => {


if (healthState.status === "idle") {
// Fetch the health data
dispatch(getHealthData());
Expand Down Expand Up @@ -72,9 +72,9 @@ function Root() {
return <Route key={index} path={"/applications/" + formatRoute(item.componentName)} element={<WebView url={item.landingPageUrl} />} />
})
}
{/*<Route path="/applications/catalog" element={<WebView url={Config.ads.url} />} />*/}
<Route path="/" element={<Navigate to="/home" replace={true} />} />
<Route path="/health-dashboard" element={<HealthDashboard />} />
<Route path="/" element={<Home />} />
<Route path="/home" element={<Home />} />
<Route path="*" element={<NotFound />} />
</Routes>
</div>
Expand Down

0 comments on commit fea8c6b

Please sign in to comment.