Skip to content

Commit 5a1f080

Browse files
committed
delete project functionality finished
1 parent ad413f2 commit 5a1f080

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

app/src/components/right/DeleteProjects.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ import ListItemText from '@material-ui/core/ListItemText';
99
import DialogTitle from '@material-ui/core/DialogTitle';
1010
import Dialog from '@material-ui/core/Dialog';
1111
import DeleteRoundedIcon from '@material-ui/icons/DeleteRounded';
12-
import AddIcon from '@material-ui/icons/Add';
1312
import { blue } from '@material-ui/core/colors';
1413

1514
import {
1615
getProjects,
1716
deleteProject
1817
} from '../../helperFunctions/projectGetSaveDel';
18+
import localforage from 'localforage';
1919
import { stateContext } from '../../context/context';
2020

2121
export interface ProjectDialogProps {
@@ -43,6 +43,7 @@ function ProjectsDialog(props: ProjectDialogProps) {
4343
)[0];
4444
console.log('selectedProject is', selectedProject);
4545
deleteProject(selectedProject);
46+
localforage.removeItem(window.localStorage.getItem('ssid'));
4647
dispatch({ type: 'RESET STATE', payload: {} });
4748
onClose();
4849
};

app/src/components/right/OpenProjects.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,15 @@ function ProjectsDialog(props: ProjectDialogProps) {
6565
</ListItem>
6666
))}
6767
{/* Change state to empty for new project */}
68+
{/* ***TODO*** Add project functionality
6869
<ListItem autoFocus button onClick={() => handleClose()}>
6970
<ListItemAvatar>
7071
<Avatar>
7172
<AddIcon />
7273
</Avatar>
7374
</ListItemAvatar>
7475
<ListItemText primary="New Project" />
75-
</ListItem>
76+
</ListItem> */}
7677
</List>
7778
</Dialog>
7879
);

app/src/components/right/ProjectManager.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ const useStyles = makeStyles({
211211
margin: '40px',
212212
display: 'flex',
213213
flexDirection: 'column',
214-
alignItems: 'center'
214+
alignItems: 'center',
215+
justifySelf: 'flex-end'
215216
},
216217

217218
logoutButton: {

app/src/public/styles/style.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,3 +369,8 @@ h3 {
369369
padding-top: 35px;
370370
width: 420px;
371371
}
372+
373+
.rightPanelWrapper {
374+
display: flex;
375+
flex-direction: column;
376+
}

0 commit comments

Comments
 (0)