useCreateReport
Overview
TheuseCreateReport hook allows users to report inappropriate or problematic content. It requires a type parameter to specify whether you’re reporting comments or entities, and returns a specialized function for that type.
Usage Example
Parameters & Returns
Hook Parameters
The hook accepts an object with the following field:| Parameter | Type | Required | Description |
|---|---|---|---|
type | "comment" | "entity" | Yes | Specifies whether to report comments or entities. |
Returns
The hook returns a single function based on the type specified:- For
type: "comment": ReturnscreateCommentReportfunction - For
type: "entity": ReturnscreateEntityReportfunction
Function Parameters
Both returned functions accept the same parameters:Yes
Yes
No

