From 90d646613bb4b0ad0168cc6e3d4016211627a90b Mon Sep 17 00:00:00 2001 From: haitaoo Date: Mon, 24 Jul 2023 10:55:21 +0800 Subject: [PATCH 1/2] refactor(Personal): An implementation of optimising `TopList` content spacing. --- ui/src/pages/Users/Personal/components/TopList/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/src/pages/Users/Personal/components/TopList/index.tsx b/ui/src/pages/Users/Personal/components/TopList/index.tsx index 42210a0f..c33fb51b 100644 --- a/ui/src/pages/Users/Personal/components/TopList/index.tsx +++ b/ui/src/pages/Users/Personal/components/TopList/index.tsx @@ -18,6 +18,7 @@ const Index: FC = ({ data, type }) => { className="mb-2" key={type === 'answer' ? item.answer_id : item.question_id}> = ({ data, type }) => { {type === 'answer' ? item.question_info.title : item.title} -
+
{item.vote_count} {t('votes', { keyPrefix: 'counts' })} @@ -41,7 +42,7 @@ const Index: FC = ({ data, type }) => {
{type === 'question' && (
0 ? 'text-success' : '' }`}> {Number(item.accepted_answer_id) > 0 ? ( @@ -58,7 +59,7 @@ const Index: FC = ({ data, type }) => { )} {type === 'answer' && item.accepted === 2 && ( -
+
{t('accepted')}
From 789f56686912c3f626160b36baca0969afe5c79f Mon Sep 17 00:00:00 2001 From: haitaoo Date: Mon, 24 Jul 2023 11:08:32 +0800 Subject: [PATCH 2/2] fix(Pagination): Replace `disabled` with `pe-none` to optimise style. --- ui/src/components/Pagination/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/components/Pagination/index.tsx b/ui/src/components/Pagination/index.tsx index 6c3847ef..de3ab101 100644 --- a/ui/src/components/Pagination/index.tsx +++ b/ui/src/components/Pagination/index.tsx @@ -134,7 +134,7 @@ const Index: FC = ({ path={handleParams(1)} /> - + )} {currentPage >= 5 && ( @@ -182,7 +182,7 @@ const Index: FC = ({ ); })} {totalPage > 5 && realPage + 2 < totalPage && ( - + )} {totalPage > 0 && currentPage < totalPage && (