From 1361c5bfab25216f03f6158f1f0c5201917f2a5b Mon Sep 17 00:00:00 2001 From: Jeff Sieu Date: Sat, 22 Oct 2022 13:22:07 +0800 Subject: [PATCH] [questions][ui] add page titles --- .../questions/QuestionAggregateBadge.tsx | 2 +- .../answer/[answerId]/[answerSlug]/index.tsx | 165 ++++++----- .../[questionId]/[questionSlug]/index.tsx | 275 +++++++++--------- apps/portal/src/pages/questions/history.tsx | 15 +- apps/portal/src/pages/questions/index.tsx | 182 ++++++------ apps/portal/src/pages/questions/lists.tsx | 130 +++++---- .../src/pages/questions/my-questions.tsx | 15 +- apps/portal/src/utils/questions/constants.ts | 2 + 8 files changed, 423 insertions(+), 363 deletions(-) diff --git a/apps/portal/src/components/questions/QuestionAggregateBadge.tsx b/apps/portal/src/components/questions/QuestionAggregateBadge.tsx index 25f7afef..6192dfb5 100644 --- a/apps/portal/src/components/questions/QuestionAggregateBadge.tsx +++ b/apps/portal/src/components/questions/QuestionAggregateBadge.tsx @@ -67,7 +67,7 @@ export default function QuestionAggregateBadge({
  • - {key} + {key} {value}
  • ))} 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 2b69b33f..bf136197 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 @@ -1,3 +1,4 @@ +import Head from 'next/head'; import { useRouter } from 'next/router'; import { useForm } from 'react-hook-form'; import { ArrowSmallLeftIcon } from '@heroicons/react/24/outline'; @@ -7,6 +8,7 @@ import AnswerCommentListItem from '~/components/questions/AnswerCommentListItem' import FullAnswerCard from '~/components/questions/card/FullAnswerCard'; import FullScreenSpinner from '~/components/questions/FullScreenSpinner'; +import { APP_TITLE } from '~/utils/questions/constants'; import { useFormRegister } from '~/utils/questions/useFormRegister'; import { trpc } from '~/utils/trpc'; @@ -64,91 +66,98 @@ export default function QuestionPage() { } return ( -
    -
    -
    -
    -
    - + + + {answer.content} - {APP_TITLE} + + +
    +
    +