diff --git a/apps/portal/src/components/questions/QuestionAggregateBadge.tsx b/apps/portal/src/components/questions/QuestionAggregateBadge.tsx index 57ab330b..5219a522 100644 --- a/apps/portal/src/components/questions/QuestionAggregateBadge.tsx +++ b/apps/portal/src/components/questions/QuestionAggregateBadge.tsx @@ -1,5 +1,6 @@ import type { ComponentProps } from 'react'; import { useMemo } from 'react'; +import { Popover } from '@headlessui/react'; import { Badge } from '@tih/ui'; type BadgeProps = ComponentProps; @@ -22,7 +23,7 @@ export default function QuestionAggregateBadge({ return mostCommon; }, { key: '', value: 0 }, - ), + ), [statistics], ); @@ -35,5 +36,16 @@ export default function QuestionAggregateBadge({ return `${mostCommonStatistic.key} (+${additionalStatisticCount})`; }, [mostCommonStatistic, additionalStatisticCount]); - return ; + return ( + + + + + +
+

Hello

+
+
+
+ ); } diff --git a/apps/portal/src/pages/questions/[questionId]/[questionSlug]/answer/[answerId]/[answerSlug]/index.tsx b/apps/portal/src/pages/questions/[questionId]/[questionSlug]/answer/[answerId]/[answerSlug]/index.tsx index 0804f60e..2b69b33f 100644 --- a/apps/portal/src/pages/questions/[questionId]/[questionSlug]/answer/[answerId]/[answerSlug]/index.tsx +++ b/apps/portal/src/pages/questions/[questionId]/[questionSlug]/answer/[answerId]/[answerSlug]/index.tsx @@ -51,10 +51,6 @@ export default function QuestionPage() { }, ); - const handleBackNavigation = () => { - router.back(); - }; - const handleSubmitComment = (data: AnswerCommentData) => { resetComment(); addComment({ @@ -73,10 +69,11 @@ export default function QuestionPage() { + />
diff --git a/apps/portal/src/pages/questions/[questionId]/[questionSlug]/index.tsx b/apps/portal/src/pages/questions/[questionId]/[questionSlug]/index.tsx index e31ef2b9..bb9a8e59 100644 --- a/apps/portal/src/pages/questions/[questionId]/[questionSlug]/index.tsx +++ b/apps/portal/src/pages/questions/[questionId]/[questionSlug]/index.tsx @@ -91,10 +91,6 @@ export default function QuestionPage() { }, ); - const handleBackNavigation = () => { - router.back(); - }; - const handleSubmitAnswer = (data: AnswerQuestionData) => { addAnswer({ content: data.answerContent, @@ -121,10 +117,11 @@ export default function QuestionPage() { + />