Skip to content

Commit

Permalink
Added new default side nav component, updated Side
Browse files Browse the repository at this point in the history
Nav to display categories, updated Header for MVP
Demo.
  • Loading branch information
hawkishpolicy committed Apr 15, 2024
1 parent 5490650 commit 0d87f34
Show file tree
Hide file tree
Showing 5 changed files with 380 additions and 25 deletions.
13 changes: 7 additions & 6 deletions frontend/src/components/ReadySetCyber/RSCDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Grid from '@mui/material/Grid';
import Stack from '@mui/material/Stack';
import Divider from '@mui/material/Divider';
import { RSCSideNav } from './RSCSideNav';
import { RSCDefaultSideNav } from './RSCDefaultSideNav';
import { RSCResult } from './RSCResult';
import { useAuthContext } from 'context';

Expand Down Expand Up @@ -38,7 +39,7 @@ export const RSCDashboard: React.FC = () => {
<Box sx={{ flexGrow: 1, padding: 2 }}>
<Grid container spacing={2}>
<Grid item xs={4}>
<RSCSideNav />
<RSCDefaultSideNav />
</Grid>
<Grid item xs={8}>
<Box sx={{ flexGrow: 1, padding: 2, backgroundColor: 'white' }}>
Expand All @@ -57,18 +58,18 @@ export const RSCDashboard: React.FC = () => {
platform, for free vulnerability scanning services to kickstart
or enhance your cybersecurity measures.
</p>
{results.map((result) => (
<Stack key={result.id} spacing={2}>
<Stack spacing={2}>
{results.map((result) => (
<RSCResult
key={result.id}
id={result.id}
type={result.type}
createdAt={result.createdAt}
updatedAt={result.updatedAt}
rscID={result.rscID}
/>
<Divider />
</Stack>
))}
))}
</Stack>
</Stack>
</Box>
</Grid>
Expand Down
24 changes: 24 additions & 0 deletions frontend/src/components/ReadySetCyber/RSCDefaultSideNav.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import React from 'react';
import { useParams } from 'react-router-dom';
import Box from '@mui/material/Box';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import Divider from '@mui/material/Divider';

export const RSCDefaultSideNav: React.FC = () => {
const { id } = useParams<{ id: string }>();

return (
<div>
<Box sx={{ width: '100%', maxWidth: 360, bgcolor: 'background.paper' }}>
<List>
<ListItem>Welcome User</ListItem>
<Divider component="li" />
<ListItem>Take Questionnaire Again</ListItem>
<Divider component="li" />
<ListItem>Logout</ListItem>
</List>
</Box>
</div>
);
};
2 changes: 1 addition & 1 deletion frontend/src/components/ReadySetCyber/RSCDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const RSCDetail: React.FC = () => {
<Box sx={{ flexGrow: 1, padding: 2 }}>
<Grid container spacing={2}>
<Grid item xs={4}>
<RSCSideNav />
<RSCSideNav categories={categories} />
</Grid>
<Grid item xs={8}>
<Box sx={{ flexGrow: 1, padding: 2, backgroundColor: 'white' }}>
Expand Down
Loading

0 comments on commit 0d87f34

Please sign in to comment.