MCPcopy Create free account
hub / github.com/dailydotdev/apps / onReportedPost

Function onReportedPost

packages/shared/src/features/posts/PostOptionButton.tsx:376–388  ·  view source on GitHub ↗
(
    reportedPost,
    { index, shouldBlockSource },
  )

Source from the content-addressed store, hash-verified

374 });
375
376 const onReportedPost: ReportedCallback = async (
377 reportedPost,
378 { index, shouldBlockSource },
379 ): Promise<void> => {
380 showMessageAndRemovePost(labels.reporting.reportFeedbackText, index);
381
382 if (shouldBlockSource) {
383 if (!reportedPost?.source) {
384 throw new Error('Reported post source is required');
385 }
386 await onBlockSource({ source: reportedPost.source });
387 }
388 };
389
390 const onBlockSourceClick = async (): Promise<void> => {
391 const { successful } = await onBlockSource({

Callers

nothing calls this directly

Calls 1

showMessageAndRemovePostFunction · 0.85

Tested by

no test coverage detected