From 868bdf09d42ec1916582ebebc2d685a85f1be77a Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 14 Oct 2022 17:30:16 +0800 Subject: [PATCH] refactor: responsive optimization --- ui/src/components/Questions/index.tsx | 60 ++++++++++++++------------- 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/ui/src/components/Questions/index.tsx b/ui/src/components/Questions/index.tsx index 6e7f8b49..70290606 100644 --- a/ui/src/components/Questions/index.tsx +++ b/ui/src/components/Questions/index.tsx @@ -32,7 +32,7 @@ const QuestionLastUpdate = ({ q }) => { if (q.update_time > q.edit_time) { // question answered return ( - <> +
{ className="text-secondary mx-1" preFix={t('answered')} /> - +
); } if (q.edit_time > q.update_time) { // question modified return ( - <> +
{ className="text-secondary mx-1" preFix={t('modified')} /> - +
); } // default: asked return ( - <> +
{ preFix={t('asked')} className="text-secondary mx-1" /> - +
); }; @@ -131,31 +131,33 @@ const QuestionList: FC = ({ source }) => { {li.status === 2 ? ` [${t('closed')}]` : ''} -
+
- - - {li.vote_count} - - = 1 ? 'text-success' : '' - }`}> - = 1 - ? 'check-circle-fill' - : 'chat-square-text-fill' - } - /> - {li.answer_count} - - - - {li.view_count} - +
+ + + {li.vote_count} + + = 1 ? 'text-success' : '' + }`}> + = 1 + ? 'check-circle-fill' + : 'chat-square-text-fill' + } + /> + {li.answer_count} + + + + {li.view_count} + +
-
+
{Array.isArray(li.tags) ? li.tags.map((tag) => { return (