From c56f1e56ec0f860af95f87be90071fe7327624e2 Mon Sep 17 00:00:00 2001 From: "wl990@naver.com" Date: Mon, 10 Mar 2025 12:35:25 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20=EC=8B=A0=EA=B3=A0=20=EB=93=B1?= =?UTF-8?q?=EB=A1=9D=20API=20+=20ReportModal=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ReportModal.tsx | 4 +++- src/types/admin.d.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/ReportModal.tsx b/src/components/ReportModal.tsx index 41ce17f..b4dd2c8 100644 --- a/src/components/ReportModal.tsx +++ b/src/components/ReportModal.tsx @@ -29,7 +29,9 @@ const ReportModal = ({ reportType, letterId, onClose }: ReportModalProps) => { reportType: reportType, reasonType: '', reason: '', - letterId: letterId, + letterId: reportType === 'LETTER' ? letterId : null, + sharePostId: reportType === 'SHARE_POST' ? letterId : null, + eventCommentId: reportType === 'EVENT_COMMENT' ? letterId : null, }); const handleReasonClick = (reason: Reason) => { diff --git a/src/types/admin.d.ts b/src/types/admin.d.ts index 21c11c7..4ef77be 100644 --- a/src/types/admin.d.ts +++ b/src/types/admin.d.ts @@ -1,5 +1,5 @@ type Status = 'PENDING' | 'RESOLVED' | 'REJECTED'; -type ReportType = 'LETTER' | 'POST' | 'COMMENT'; +type ReportType = 'LETTER' | 'SHARE_POST' | 'EVENT_COMMENT'; type Reason = 'ABUSE' | 'DEFAMATION' | 'HARASSMENT' | 'THREATS' | 'ETC'; interface ReportQueryString { @@ -41,6 +41,8 @@ interface PostReportRequest { reasonType: Reason | ''; reason: string; letterId: number | null; + sharePostId: number | null; + eventCommentId: number | null; } interface PatchReportRequest {