From f12c36fc4b00af8f48f963acfaecf4e3f98486f8 Mon Sep 17 00:00:00 2001 From: Jeff Sieu Date: Sun, 6 Nov 2022 15:04:41 +0800 Subject: [PATCH] [questions][ui] redesign question page --- .../questions/AnswerCommentListItem.tsx | 2 +- .../card/question/BaseQuestionCard.tsx | 9 +- .../card/question/FullQuestionCard.tsx | 1 + .../[questionId]/[questionSlug]/index.tsx | 190 ++++++++++-------- 4 files changed, 110 insertions(+), 92 deletions(-) diff --git a/apps/portal/src/components/questions/AnswerCommentListItem.tsx b/apps/portal/src/components/questions/AnswerCommentListItem.tsx index c65a379f..a51cd291 100644 --- a/apps/portal/src/components/questions/AnswerCommentListItem.tsx +++ b/apps/portal/src/components/questions/AnswerCommentListItem.tsx @@ -25,7 +25,7 @@ export default function AnswerCommentListItem({ useAnswerCommentVote(answerCommentId); return ( -
+
{ if (countries === undefined) { @@ -274,7 +275,11 @@ export default function BaseQuestionCard({ return (
+ className={clsx( + 'group flex gap-4 border-slate-300', + showHover && 'hover:bg-slate-50', + !hideCard && 'rounded-md border bg-white p-4', + )}> {cardContent} {showDeleteButton && (
diff --git a/apps/portal/src/components/questions/card/question/FullQuestionCard.tsx b/apps/portal/src/components/questions/card/question/FullQuestionCard.tsx index 0ea147fe..2c02f1ba 100644 --- a/apps/portal/src/components/questions/card/question/FullQuestionCard.tsx +++ b/apps/portal/src/components/questions/card/question/FullQuestionCard.tsx @@ -28,6 +28,7 @@ export default function FullQuestionCard(props: QuestionOverviewCardProps) { return (
- { - await addEncounterAsync({ - cityId: data.cityId, - companyId: data.company, - countryId: data.countryId, - questionId: questionId as string, - role: data.role, - seenAt: data.seenAt, - stateId: data.stateId, - }); - }} - /> -
- -
-
-