Small fixes
This commit is contained in:
parent
516784c6bb
commit
8a2152395f
1 changed files with 2 additions and 5 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue