UNPKG

@replyke/core

Version:

Replyke: Build interactive apps with social features like comments, votes, feeds, user lists, notifications, and more.

23 lines (22 loc) 732 B
import { ReportReasonKey } from "../../constants/reportReasons"; export interface UseCreateReportProps { type: "comment" | "entity"; } export interface CreateReportProps { targetId: string; targetType: "comment" | "entity"; reason: ReportReasonKey; details?: string; } export interface CreateCommentReportProps { targetId: string; reason: ReportReasonKey; details?: string; } export interface CreateEntityReportProps { targetId: string; reason: ReportReasonKey; details?: string; } declare function useCreateReport({ type }: UseCreateReportProps): ((props: CreateCommentReportProps) => Promise<void>) | ((props: CreateEntityReportProps) => Promise<void>); export default useCreateReport;