Can now delete project
This commit is contained in:
parent
b50d88f670
commit
524bd6c691
1 changed files with 10 additions and 1 deletions
|
@ -3,6 +3,7 @@ import Button from "./Button";
|
||||||
import GetUsersInProject, { ProjectMember } from "./GetUsersInProject";
|
import GetUsersInProject, { ProjectMember } from "./GetUsersInProject";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import GetProjectTimes, { projectTimes } from "./GetProjectTimes";
|
import GetProjectTimes, { projectTimes } from "./GetProjectTimes";
|
||||||
|
import DeleteProject from "./DeleteProject";
|
||||||
|
|
||||||
function ProjectInfoModal(props: {
|
function ProjectInfoModal(props: {
|
||||||
projectname: string;
|
projectname: string;
|
||||||
|
@ -66,7 +67,15 @@ function ProjectInfoModal(props: {
|
||||||
<Button
|
<Button
|
||||||
text={"Delete"}
|
text={"Delete"}
|
||||||
onClick={function (): void {
|
onClick={function (): void {
|
||||||
//DELETE PROJECT
|
if (
|
||||||
|
window.confirm(
|
||||||
|
"Are you sure you want to delete this project?",
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
DeleteProject({
|
||||||
|
projectToDelete: props.projectname,
|
||||||
|
});
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
type="button"
|
type="button"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue