Skip to content

Commit e4dfe3e

Browse files
committed
Indicate what page is active on sidebar
Highlights what page is currently active on sidebar. Fixes #62
1 parent d48ce10 commit e4dfe3e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/ui/index.tsx

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66
import { StrictMode } from "react";
77
import { createRoot } from "react-dom/client";
8-
import { HashRouter as Router, Routes, Route } from "react-router-dom";
8+
import {
9+
HashRouter as Router,
10+
Routes,
11+
Route,
12+
Navigate,
13+
} from "react-router-dom";
914
import { Container } from "react-bootstrap";
1015

1116
import NavigationBar from "./components/NavigationBar";
@@ -30,7 +35,10 @@ const App = () => {
3035
<Sidebar />
3136
<Container className="main-content">
3237
<Routes>
33-
<Route path="/" element={<RecipeEnrollmentPage />} />
38+
<Route
39+
path="/"
40+
element={<Navigate to="/experiment-json" replace />}
41+
/>
3442
<Route
3543
path="/experiment-json"
3644
element={<RecipeEnrollmentPage />}

0 commit comments

Comments
 (0)