From 7b044e11c32f0f1a1ec94f6b167620fdddfae39a Mon Sep 17 00:00:00 2001 From: Jeff Sieu Date: Mon, 7 Nov 2022 23:08:49 +0800 Subject: [PATCH] [questions][ui] improve browse mobile ui --- .../questions/QuestionSearchBar.tsx | 48 ++++++----- .../card/question/BaseQuestionCard.tsx | 80 ++++++++++++++----- apps/portal/src/pages/questions/browse.tsx | 2 +- 3 files changed, 91 insertions(+), 39 deletions(-) diff --git a/apps/portal/src/components/questions/QuestionSearchBar.tsx b/apps/portal/src/components/questions/QuestionSearchBar.tsx index bafcb3cb..79f89316 100644 --- a/apps/portal/src/components/questions/QuestionSearchBar.tsx +++ b/apps/portal/src/components/questions/QuestionSearchBar.tsx @@ -20,31 +20,43 @@ export default function QuestionSearchBar({ ...sortOptionsSelectProps }: QuestionSearchBarProps) { return ( -
-
- { - onQueryChange(value); - }} - /> -
-
- -
+
+
+
+ { + onQueryChange(value); + }} + /> +
+
+
+
+
+
+
); diff --git a/apps/portal/src/components/questions/card/question/BaseQuestionCard.tsx b/apps/portal/src/components/questions/card/question/BaseQuestionCard.tsx index 77b7f5c9..0aa3d31d 100644 --- a/apps/portal/src/components/questions/card/question/BaseQuestionCard.tsx +++ b/apps/portal/src/components/questions/card/question/BaseQuestionCard.tsx @@ -177,12 +177,26 @@ export default function BaseQuestionCard({ const cardContent = ( <> {showVoteButtons && ( - + <> +
+ +
+
+ +
+ )}
@@ -230,22 +244,48 @@ export default function BaseQuestionCard({ showCreateEncounterButton) && (
{showAnswerStatistics && ( -
+
+
+ )} {showReceivedStatistics && ( -
+
+
+ )} {showCreateEncounterButton && (