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 new file mode 100644 index 00000000..eea8f5cc --- /dev/null +++ b/apps/portal/src/pages/questions/[questionId]/[questionSlug]/answer/[answerId]/[answerSlug]/index.tsx @@ -0,0 +1,115 @@ +import { useRouter } from 'next/router'; +import { useForm } from 'react-hook-form'; +import { ArrowSmallLeftIcon } from '@heroicons/react/24/outline'; +import { Button, Collapsible, Select, TextArea } from '@tih/ui'; + +import AnswerCard from '~/components/questions/card/AnswerCard'; +import FullQuestionCard from '~/components/questions/card/FullQuestionCard'; + +import { SAMPLE_QUESTION } from '~/utils/questions/constants'; +import { useFormRegister } from '~/utils/questions/useFormRegister'; + +export type AnswerData = { + answerContent: string; +}; + +export default function QuestionPage() { + const router = useRouter(); + const { + register: formRegister, + handleSubmit, + formState: { isDirty, isValid }, + } = useForm({ mode: 'onChange' }); + const register = useFormRegister(formRegister); + const question = SAMPLE_QUESTION; + + const handleBackNavigation = () => { + router.back(); + }; + + const handleSubmitAnswer = (data: AnswerData) => { + // eslint-disable-next-line no-console + console.log(data); + }; + + return ( +
+
+ +
+
+
+ +
+ +
Comment placeholder
+
+
+
+