From 2bae0e794c8fb0b13563273a05e8c4303cf1ba11 Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 18 Jun 2024 20:23:20 +0800 Subject: [PATCH] fix: authed input name getter Signed-off-by: Innei --- src/components/modules/comment/CommentBox/AuthedInput.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/modules/comment/CommentBox/AuthedInput.tsx b/src/components/modules/comment/CommentBox/AuthedInput.tsx index d3df117fb4..7485f94309 100644 --- a/src/components/modules/comment/CommentBox/AuthedInput.tsx +++ b/src/components/modules/comment/CommentBox/AuthedInput.tsx @@ -14,7 +14,10 @@ export const CommentBoxAuthedInput = () => { const { user } = useUser() const setter = useSetCommentBoxValues() const displayName = user - ? user.fullName || user.lastName || user.firstName || 'Anonymous' + ? user.fullName || + `${user.firstName || ''} ${user.lastName || ''}`.trim() || + user.username || + 'Anonymous' : '' useEffect(() => {