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 {