From c82655cce4a024336d09efd4be33f06e050f92fd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 2 Nov 2023 01:15:14 +0900 Subject: [PATCH] feat: adding icon for showing explanation on author name --- apps/forum/src/components/Comment.tsx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/apps/forum/src/components/Comment.tsx b/apps/forum/src/components/Comment.tsx index f25226bd..67f0f3af 100644 --- a/apps/forum/src/components/Comment.tsx +++ b/apps/forum/src/components/Comment.tsx @@ -129,12 +129,29 @@ const Comment = ({ comment, thread, setComments, setThread }: Props) => { }; const time = timeFormatter(comment); + + const [nameFlag, setNameFlag] = useState(false); + const toggleExplain = ()=> { + setNameFlag( !nameFlag ); + } + return (
- {comment.author} +

+ {comment.author} + + + + + + {nameFlag && +
+ We don't collect user info!\nTreat this code as user name~ +
} +

{convertUrlsToLinks(comment.body)}