From 6501bb9f0d9f54eb068025f881840f6190ff131b Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 9 Jan 2022 00:56:28 +0100 Subject: [PATCH] Port comment report functionality to TypeScript --- .../retrospring/features/answerbox/comment/report.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 app/javascript/retrospring/features/answerbox/comment/report.ts diff --git a/app/javascript/retrospring/features/answerbox/comment/report.ts b/app/javascript/retrospring/features/answerbox/comment/report.ts new file mode 100644 index 00000000..ec1292f8 --- /dev/null +++ b/app/javascript/retrospring/features/answerbox/comment/report.ts @@ -0,0 +1,7 @@ +export function commentReportHandler(event: Event): void { + event.preventDefault(); + const button = event.target as HTMLButtonElement; + const commentId = button.dataset.cId; + + window['reportDialog']('comment', commentId); +} \ No newline at end of file