Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 13 additions & 2 deletions client/src/components/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import Toolbar from "@mui/material/Toolbar";
import Button from "@mui/material/Button";
import { Link } from 'react-router-dom';
import TimeRangePicker from "./TimeRangePicker.jsx";

import HelpDialog from "./HelpDialog.jsx";

export default function Header(){
const LayoutContext = useLayoutContext();

const [helpOpen, setHelpOpen] = React.useState(false);

return(
<AppBar position='sticky'>
<Toolbar disableGutters>
Expand All @@ -34,6 +36,15 @@ export default function Header(){
Login
</Button>
</Link>
<HelpDialog open={helpOpen} onClose={() => setHelpOpen(false)} />
<Button onClick={() => setHelpOpen(true)}
sx={{
color: 'white',
bgcolor: 'black',
}}
>
Help
</Button>
</styles.HeaderRightBox>
</Toolbar>
</AppBar>
Expand Down
22 changes: 22 additions & 0 deletions client/src/components/HelpDialog.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import Dialog from '@mui/material/Dialog';
import DialogTitle from '@mui/material/DialogTitle';
import DialogContent from '@mui/material/DialogContent';
import DialogActions from '@mui/material/DialogActions';
import Button from '@mui/material/Button';

function HelpDialog({ open, onClose }) {
return (
<Dialog open={open} onClose={onClose}>
<DialogTitle>Help</DialogTitle>
<DialogContent>
hello you have reached the help pop-up
</DialogContent>
<DialogActions>
<Button onClick={onClose}>CLOSE</Button>
</DialogActions>
</Dialog>
);
}

export default HelpDialog;
Loading