Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/components/ReportModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
4 changes: 3 additions & 1 deletion src/types/admin.d.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -41,6 +41,8 @@ interface PostReportRequest {
reasonType: Reason | '';
reason: string;
letterId: number | null;
sharePostId: number | null;
eventCommentId: number | null;
}

interface PatchReportRequest {
Expand Down