diff --git a/frontend/src/Components/EditWeeklyReport.tsx b/frontend/src/Components/EditWeeklyReport.tsx index e824b19..76c2b94 100644 --- a/frontend/src/Components/EditWeeklyReport.tsx +++ b/frontend/src/Components/EditWeeklyReport.tsx @@ -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);