From b8fd1c94dda40c9d895d9ceca9f64c7639edd951 Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Fri, 20 Jan 2023 23:48:38 +0800 Subject: [PATCH] fix: mailto --- src/common/component/LinkifyText.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/common/component/LinkifyText.tsx b/src/common/component/LinkifyText.tsx index 08c10dec..109acdc4 100644 --- a/src/common/component/LinkifyText.tsx +++ b/src/common/component/LinkifyText.tsx @@ -20,10 +20,15 @@ const LinkifyText = ({ url = true, mention = true, mentionTextOnly = false, ment return ( { + if (mentionTextOnly) return <> + {content} + ; + return + {content} + ; + }, url: ({ content, attributes: { href: link } }) => { console.log("attr", link); if (!url) return <>{content}; @@ -31,7 +36,7 @@ const LinkifyText = ({ url = true, mention = true, mentionTextOnly = false, ment {content} - {!link.startsWith("mailto") && } + ; }, mention: ({ content }) => {