From 8ffa3b3d0ee4cf00d00e93b3f8c3808038ce33f2 Mon Sep 17 00:00:00 2001 From: shuai Date: Mon, 21 Aug 2023 17:19:38 +0800 Subject: [PATCH] fix: optimize the user name is too long --- ui/src/components/Counts/index.tsx | 11 ++++++----- ui/src/components/QuestionList/index.tsx | 8 +++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ui/src/components/Counts/index.tsx b/ui/src/components/Counts/index.tsx index 42555bb4..c32fb6b6 100644 --- a/ui/src/components/Counts/index.tsx +++ b/ui/src/components/Counts/index.tsx @@ -30,9 +30,10 @@ const Index: FC = ({ const { t } = useTranslation('translation', { keyPrefix: 'counts' }); return ( -
+
{showVotes && ( -
+
{data.votes} {t('votes')} @@ -41,7 +42,7 @@ const Index: FC = ({ )} {showAccepted && ( -
+
{t('accepted')}
@@ -49,7 +50,7 @@ const Index: FC = ({ {showAnswers && (
{isAccepted ? ( @@ -63,7 +64,7 @@ const Index: FC = ({
)} {showViews && ( - + {data.views} {t('views')} diff --git a/ui/src/components/QuestionList/index.tsx b/ui/src/components/QuestionList/index.tsx index 0911a945..4aec418d 100644 --- a/ui/src/components/QuestionList/index.tsx +++ b/ui/src/components/QuestionList/index.tsx @@ -84,8 +84,10 @@ const QuestionList: FC = ({ {li.status === 2 ? ` [${t('closed')}]` : ''} -
-
+
+
= ({ views: li.view_count, }} isAccepted={li.accepted_answer_id >= 1} - className="ms-0 ms-md-3 mt-2 mt-md-0" + className="justify-content-start-end justify-content-md-end flex-fill" />