Minor fixes
This commit is contained in:
parent
0fb06790af
commit
47ce986834
1 changed files with 5 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
|||
import { useState, useEffect } from "react";
|
||||
import { NewWeeklyReport } from "../Types/goTypes";
|
||||
import { WeeklyReport, NewWeeklyReport } from "../Types/goTypes";
|
||||
import { api } from "../API/API";
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import Button from "./Button";
|
||||
|
@ -31,8 +31,10 @@ export default function GetWeeklyReport(): JSX.Element {
|
|||
);
|
||||
|
||||
if (response.success) {
|
||||
const report: NewWeeklyReport = response.data ?? {
|
||||
projectName: "",
|
||||
const report: WeeklyReport = response.data ?? {
|
||||
reportId: 0,
|
||||
userId: 0,
|
||||
projectId: 0,
|
||||
week: 0,
|
||||
developmentTime: 0,
|
||||
meetingTime: 0,
|
||||
|
@ -41,7 +43,6 @@ export default function GetWeeklyReport(): JSX.Element {
|
|||
studyTime: 0,
|
||||
testingTime: 0,
|
||||
};
|
||||
|
||||
setWeek(report.week);
|
||||
setDevelopmentTime(report.developmentTime);
|
||||
setMeetingTime(report.meetingTime);
|
||||
|
|
Loading…
Add table
Reference in a new issue