From 9c2625105a10de7448563825b3ecfa7f328cf1e7 Mon Sep 17 00:00:00 2001 From: wlren Date: Mon, 10 Oct 2022 01:30:56 +0800 Subject: [PATCH] [questions][ui] add hover --- apps/portal/src/components/questions/card/AnswerCard.tsx | 7 ++++++- apps/portal/src/components/questions/card/QuestionCard.tsx | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/portal/src/components/questions/card/AnswerCard.tsx b/apps/portal/src/components/questions/card/AnswerCard.tsx index 1745522e..16088f3c 100644 --- a/apps/portal/src/components/questions/card/AnswerCard.tsx +++ b/apps/portal/src/components/questions/card/AnswerCard.tsx @@ -7,6 +7,7 @@ import VotingButtons from '../VotingButtons'; export type AnswerCardProps = { authorImageUrl: string; authorName: string; + commentCount: number; content: string; createdAt: Date; upvoteCount: number; @@ -18,9 +19,10 @@ function AnswerCardWithoutHref({ upvoteCount, content, createdAt, + commentCount, }: AnswerCardProps) { return ( -
+
@@ -34,6 +36,9 @@ function AnswerCardWithoutHref({

{content}

+

+ {commentCount} comment(s) +

); diff --git a/apps/portal/src/components/questions/card/QuestionCard.tsx b/apps/portal/src/components/questions/card/QuestionCard.tsx index 3b4ed8c5..2c034b9f 100644 --- a/apps/portal/src/components/questions/card/QuestionCard.tsx +++ b/apps/portal/src/components/questions/card/QuestionCard.tsx @@ -64,7 +64,7 @@ export default function QuestionCard({ location, }: QuestionCardProps) { return ( -
+
{showVoteButtons && }