import { useRedact } from '@towns-protocol/react-sdk'
redact
import { useRedact } from '@towns-protocol/react-sdk' const { redact } = useRedact(streamId) redact({ eventId: messageEventId })
import { useRedact } from '@towns-protocol/react-sdk' const { redact } = useRedact(streamId) redact({ eventId: reactionEventId })
function useRedact( streamId: string, config?: ActionConfig<Channel["redact"]>, ): { data: { eventId: string; } | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; redact: (eventId: string, reason?: string | undefined) => Promise<{ eventId: string; }>; }
string
ActionConfig<Channel["redact"]>
{ data: { eventId: string; } | undefined; error: Error | undefined; isPending: boolean; isSuccess: boolean; isError: boolean; redact: (eventId: string, reason?: string | undefined) => Promise<{ eventId: string; }>; }
Was this page helpful?