Skip to content

Commit

Permalink
hotfix : type명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
keemsebin committed Oct 2, 2024
1 parent 752377b commit 27996c0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/components/report/detail/Report.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ type Props = {
};

export default function Report({ reportData, term }: Props) {
const { content, imageUrls, participants } = reportData ?? {};
const { content, ImageUrls, participants } = reportData ?? {};

const [data, setData] = useState(reportData);

const showImage = imageUrls && imageUrls[0] ? imageUrls[0] : UnSubmitImage;
const showImage =
ImageUrls && ImageUrls[0] ? parseImgUrl(ImageUrls[0]) : UnSubmitImage;
useEffect(() => {
setData(data);
}, [imageUrls, data]);
}, [ImageUrls, data]);

const isParticipants =
participants?.filter((participant) => participant.name).length > 0;
Expand Down
4 changes: 2 additions & 2 deletions src/types/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type EditReport = {
startTime: string;
endTime: string;
content: string;
imageUrls?: string[];
ImageUrls?: string[];
uploadFiles?: File | null;
participants: StudentInfo[];
token?: string;
Expand Down Expand Up @@ -63,7 +63,7 @@ export type ReportResponse = {
endDate: string;
startTime: string;
endTime: string;
imageUrls: string[];
ImageUrls: string[];
participants: StudentInfo[];
};

Expand Down
4 changes: 2 additions & 2 deletions src/utils/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const parseReportResponseToEditReport = (
place,
content,
participants,
imageUrls,
ImageUrls,
startDate: start,
endDate: end,
} = report;
Expand All @@ -66,7 +66,7 @@ export const parseReportResponseToEditReport = (
content,
date: { startDate, endDate },
startTime,
imageUrls,
ImageUrls,
endTime,
participants,
};
Expand Down

0 comments on commit 27996c0

Please sign in to comment.