Small fixes

This commit is contained in:
Peter KW 2024-03-18 01:31:58 +01:00
parent 516784c6bb
commit 8a2152395f

View file

@ -13,7 +13,7 @@ import Button from "./Button";
function CreateProject(props: { name: string; description: string }): boolean {
const project: NewProject = {
name: props.name,
description: props.name,
description: props.description,
};
let created = false;
@ -21,13 +21,10 @@ function CreateProject(props: { name: string; description: string }): boolean {
api
.createProject(project, localStorage.getItem("accessToken") ?? "")
.then((response: APIResponse<Project>) => {
//vv_FOR DEBGUGGING_vv
console.log(localStorage.getItem("accessToken"));
if (response.success) {
created = true;
} else {
console.error("Could not add project");
console.error(response.message);
}
})
.catch((error) => {