Skip to content

Commit abdd729

Browse files
committed
Begin rework of applications page
1 parent 84abd18 commit abdd729

2 files changed

Lines changed: 42 additions & 25 deletions

File tree

app/components/Applications.tsx

Lines changed: 38 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import React, { useContext, useEffect, useState } from 'react';
2-
import { Grid, IconButton, Modal, Paper } from '@material-ui/core';
2+
import {
3+
Button,
4+
Grid,
5+
IconButton,
6+
Modal,
7+
Paper,
8+
Card,
9+
CardHeader,
10+
CardContent,
11+
} from '@material-ui/core';
312
import DeleteForeverOutlinedIcon from '@material-ui/icons/DeleteForeverOutlined';
413
import { makeStyles } from '@material-ui/core/styles';
514
import { DashboardContext } from '../context/DashboardContext';
@@ -42,11 +51,7 @@ const Applications = () => {
4251
marginBottom: theme.spacing(1),
4352
},
4453
hover: {
45-
position: 'relative',
46-
top: '5%',
47-
right: '5%',
48-
height: 120,
49-
width: 120,
54+
color: 'white',
5055
boxShadow: 'none',
5156
'&:hover, &.Mui-focusVisible': { color: 'red' },
5257
},
@@ -58,21 +63,17 @@ const Applications = () => {
5863
<>
5964
{applications.map((app: string, i: number | any | string | undefined) => (
6065
<Grid item xs={6} key={i}>
61-
<Paper
62-
className={classes.paper}
63-
id={i}
64-
key={i}
65-
onClick={(event: React.MouseEvent<HTMLElement>) => handleClick(app, i)}
66-
>
67-
{app}
68-
<IconButton
69-
aria-label="Delete"
70-
onClick={(event: React.MouseEvent<HTMLElement>) => confirmDelete(app, i)}
71-
color="primary"
72-
>
73-
<DeleteForeverOutlinedIcon className={classes.hover} />
74-
</IconButton>
75-
</Paper>
66+
<Card className={classes.paper}>
67+
<CardHeader
68+
avatar={
69+
<Button
70+
className={classes.hover}
71+
startIcon={<DeleteForeverOutlinedIcon />}
72+
></Button>
73+
}
74+
></CardHeader>
75+
<CardContent>{app}</CardContent>
76+
</Card>
7677
</Grid>
7778
))}
7879
<Modal open={open} onClose={() => setOpen(false)}>
@@ -83,3 +84,19 @@ const Applications = () => {
8384
};
8485

8586
export default Applications;
87+
88+
// <IconButton
89+
// className={classes.btnStyle}
90+
// aria-label="Delete"
91+
// onClick={(event: React.MouseEvent<HTMLElement>) => confirmDelete(app, i)}
92+
// color="primary"
93+
// >
94+
// <DeleteForeverOutlinedIcon className={classes.hover} />
95+
// </IconButton>
96+
97+
// <Paper
98+
// className={classes.paper}
99+
// id={i}
100+
// key={i}
101+
// onClick={(event: React.MouseEvent<HTMLElement>) => handleClick(app, i)}
102+
// >

app/components/Occupied.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const Occupied: React.FC = () => {
1313
const useStyles = makeStyles(theme => ({
1414
paper: {
1515
color: theme.palette.text.secondary,
16-
// whiteSpace: 'nowrap',
16+
height: 340,
1717
background: 'rgb(33, 34, 41)',
1818
boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .3)',
1919
'&:hover, &.Mui-focusVisible': { background: 'rgb(33, 34, 41)' },
@@ -52,11 +52,11 @@ const Occupied: React.FC = () => {
5252
<AddModal setOpen={setOpen} />
5353
</Modal>
5454
<Grid className={classes.grid} container spacing={3}>
55+
<Button className={classes.paper} onClick={() => setOpen(true)}>
56+
<AddCircleOutlineTwoToneIcon className={classes.icon} />
57+
</Button>
5558
<Applications />
5659
</Grid>
57-
<Button className={classes.paper} onClick={() => setOpen(true)}>
58-
<AddCircleOutlineTwoToneIcon className={classes.icon} />
59-
</Button>
6060
</div>
6161
);
6262
};

0 commit comments

Comments
 (0)