From 68f3c729452e57bf3af7ef3faf151c12f8420e29 Mon Sep 17 00:00:00 2001 From: Ren Weilin <66356390+wlren@users.noreply.github.com> Date: Mon, 31 Oct 2022 11:30:28 +0800 Subject: [PATCH] [questions][ui] Minor UI cleanup (#470) * [questions][ui] fix no more questions overlap * [questions][ui] remove redundent horizontal div * [questions][ui] reduce gap --- .../questions/ContributeQuestionDialog.tsx | 8 +- .../forms/ContributeQuestionForm.tsx | 1 - apps/portal/src/pages/questions/browse.tsx | 112 +++++++++--------- 3 files changed, 59 insertions(+), 62 deletions(-) diff --git a/apps/portal/src/components/questions/ContributeQuestionDialog.tsx b/apps/portal/src/components/questions/ContributeQuestionDialog.tsx index ed31837d..ae08724b 100644 --- a/apps/portal/src/components/questions/ContributeQuestionDialog.tsx +++ b/apps/portal/src/components/questions/ContributeQuestionDialog.tsx @@ -35,13 +35,7 @@ export default function ContributeQuestionDialog({ return (
- { - // Todo: save state - onCancel(); - }}> + -

Additional information

diff --git a/apps/portal/src/pages/questions/browse.tsx b/apps/portal/src/pages/questions/browse.tsx index a66b1104..9a974f5d 100644 --- a/apps/portal/src/pages/questions/browse.tsx +++ b/apps/portal/src/pages/questions/browse.tsx @@ -486,7 +486,7 @@ export default function QuestionsBrowsePage() {
-
+
{ const { cityId, countryId, stateId } = data.location; @@ -502,60 +502,64 @@ export default function QuestionsBrowsePage() { }); }} /> -
- { - setFilterDrawerOpen(!filterDrawerOpen); - }} - onSortOrderChange={setSortOrder} - onSortTypeChange={setSortType} - /> -
-
- {(questionsQueryData?.pages ?? []).flatMap( - ({ data: questions }) => - questions.map((question) => { - const { companyCounts, countryCounts, roleCounts } = - relabelQuestionAggregates( - question.aggregatedQuestionEncounters, - ); +
+
+ { + setFilterDrawerOpen(!filterDrawerOpen); + }} + onSortOrderChange={setSortOrder} + onSortTypeChange={setSortType} + /> +
+
+ {(questionsQueryData?.pages ?? []).flatMap( + ({ data: questions }) => + questions.map((question) => { + const { companyCounts, countryCounts, roleCounts } = + relabelQuestionAggregates( + question.aggregatedQuestionEncounters, + ); - return ( - - ); - }), - )} - - {questionCount === 0 && ( -
- -

Nothing found.

- {hasFilters &&

Try changing your search criteria.

} -
- )} + return ( + + ); + }), + )} + {questionCount !== 0 && ( + + )} + {questionCount === 0 && ( +
+ +

Nothing found.

+ {hasFilters &&

Try changing your search criteria.

} +
+ )} +