Skip to content

Commit

Permalink
Introduce how to page and introduction video to the system (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
umutozdemir authored Aug 12, 2024
1 parent 3bd09f5 commit 6a394fa
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 3 deletions.
Binary file added frontend/public/how-to.mp4
Binary file not shown.
3 changes: 2 additions & 1 deletion frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function App() {
<div className="main-content">
<Routes>
<Route path="/" element={<Dashboard onLogout={handleLogout} />} />
<Route path="/adminView" element={<Dashboard onLogout={handleLogout} view="admin" />} />
<Route path="/admin-panel" element={<Dashboard onLogout={handleLogout} view="admin" />} />
<Route path="/how-to" element={<Dashboard onLogout={handleLogout} view="how-to" />} />
</Routes>
</div>
</>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import DefectConfig from '../defectConfig/DefectConfig';
import Sidebar from "../sidebar/Sidebar";
import AdminView from '../adminView/AdminView';
import logo from '../../logo.svg';
import HowTo from "../howTo/HowTo";

function Copyright(props) {
return (
Expand Down Expand Up @@ -183,7 +184,10 @@ export default function Dashboard({ view, onLogout }) {
<Toolbar />
<Container maxWidth="lg" sx={{ mt: 4, mb: 4 }}>
{view === 'admin' ? (
<AdminView />) : (
<AdminView />
) : view === 'how-to' ? (
<HowTo />
) : (

<><Grid container spacing={3}>
{/* Chart */}
Expand Down
13 changes: 13 additions & 0 deletions frontend/src/components/howTo/HowTo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';

export default function HowTo () {
return (
<div>
<h2>How To</h2>
<video width="100%" controls>
<source src="how-to.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>
</div>
);
};
2 changes: 1 addition & 1 deletion frontend/src/components/sidebar/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function Sidebar ({ isAdmin }) {
<ListItemText primary="Admin Panel" />
</ListItemButton>
)}
<ListItemButton>
<ListItemButton component={RouterLink} to={'/how-to'}>
<ListItemIcon>
<SlideshowIcon />
</ListItemIcon>
Expand Down

0 comments on commit 6a394fa

Please sign in to comment.