From 0943d3bc765bb2842494f9f4821d0bc38111fbf1 Mon Sep 17 00:00:00 2001 From: robertu <4065233+robertu7@users.noreply.github.com> Date: Tue, 27 Aug 2024 16:08:57 +0800 Subject: [PATCH] feat(comment): always open new tab for links on comment content --- src/components/Comment/Content/Collapsed.tsx | 2 -- src/components/Comment/Content/index.tsx | 3 --- 2 files changed, 5 deletions(-) diff --git a/src/components/Comment/Content/Collapsed.tsx b/src/components/Comment/Content/Collapsed.tsx index c42380de44..a40e5af0ca 100644 --- a/src/components/Comment/Content/Collapsed.tsx +++ b/src/components/Comment/Content/Collapsed.tsx @@ -3,7 +3,6 @@ import { useState } from 'react' import { FormattedMessage } from 'react-intl' import { TEST_ID } from '~/common/enums' -import { captureClicks } from '~/common/utils' import { Button, TextIcon } from '~/components' import styles from './styles.module.css' @@ -28,7 +27,6 @@ const Collapsed = ({ dangerouslySetInnerHTML={{ __html: content || '', }} - onClick={captureClicks} data-test-id={TEST_ID.COMMENT_CONETNT} /> ) diff --git a/src/components/Comment/Content/index.tsx b/src/components/Comment/Content/index.tsx index 8948b0e6dc..eb7def587f 100644 --- a/src/components/Comment/Content/index.tsx +++ b/src/components/Comment/Content/index.tsx @@ -4,7 +4,6 @@ import { useContext } from 'react' import { FormattedMessage } from 'react-intl' import { COMMENT_TYPE_TEXT, TEST_ID } from '~/common/enums' -import { captureClicks } from '~/common/utils' import { Expandable, LanguageContext } from '~/components' import { CommentContentCommentPrivateFragment, @@ -110,7 +109,6 @@ export const CommentContent = ({ dangerouslySetInnerHTML={{ __html: content || '', }} - onClick={captureClicks} data-test-id={TEST_ID.COMMENT_CONETNT} /> @@ -121,7 +119,6 @@ export const CommentContent = ({ dangerouslySetInnerHTML={{ __html: content || '', }} - onClick={captureClicks} data-test-id={TEST_ID.COMMENT_CONETNT} /> )}