Skip to content

Commit 6a394fa

Browse files
authored
Introduce how to page and introduction video to the system (#35)
1 parent 3bd09f5 commit 6a394fa

File tree

5 files changed

+21
-3
lines changed

5 files changed

+21
-3
lines changed

frontend/public/how-to.mp4

4.94 MB
Binary file not shown.

frontend/src/App.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ function App() {
3232
<div className="main-content">
3333
<Routes>
3434
<Route path="/" element={<Dashboard onLogout={handleLogout} />} />
35-
<Route path="/adminView" element={<Dashboard onLogout={handleLogout} view="admin" />} />
35+
<Route path="/admin-panel" element={<Dashboard onLogout={handleLogout} view="admin" />} />
36+
<Route path="/how-to" element={<Dashboard onLogout={handleLogout} view="how-to" />} />
3637
</Routes>
3738
</div>
3839
</>

frontend/src/components/dashboard/Dashboard.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import DefectConfig from '../defectConfig/DefectConfig';
2525
import Sidebar from "../sidebar/Sidebar";
2626
import AdminView from '../adminView/AdminView';
2727
import logo from '../../logo.svg';
28+
import HowTo from "../howTo/HowTo";
2829

2930
function Copyright(props) {
3031
return (
@@ -183,7 +184,10 @@ export default function Dashboard({ view, onLogout }) {
183184
<Toolbar />
184185
<Container maxWidth="lg" sx={{ mt: 4, mb: 4 }}>
185186
{view === 'admin' ? (
186-
<AdminView />) : (
187+
<AdminView />
188+
) : view === 'how-to' ? (
189+
<HowTo />
190+
) : (
187191

188192
<><Grid container spacing={3}>
189193
{/* Chart */}
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react';
2+
3+
export default function HowTo () {
4+
return (
5+
<div>
6+
<h2>How To</h2>
7+
<video width="100%" controls>
8+
<source src="how-to.mp4" type="video/mp4" />
9+
Your browser does not support the video tag.
10+
</video>
11+
</div>
12+
);
13+
};

frontend/src/components/sidebar/Sidebar.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default function Sidebar ({ isAdmin }) {
2323
<ListItemText primary="Admin Panel" />
2424
</ListItemButton>
2525
)}
26-
<ListItemButton>
26+
<ListItemButton component={RouterLink} to={'/how-to'}>
2727
<ListItemIcon>
2828
<SlideshowIcon />
2929
</ListItemIcon>

0 commit comments

Comments
 (0)