diff --git a/QandA/frontend/src/QuestionPage.tsx b/QandA/frontend/src/QuestionPage.tsx index 90415f5..9483c81 100644 --- a/QandA/frontend/src/QuestionPage.tsx +++ b/QandA/frontend/src/QuestionPage.tsx @@ -1,17 +1,32 @@ /** @jsxImportSource @emotion/react */ import { css } from '@emotion/react'; -import { gray3, gray6 } from './Styles'; +import { + FieldContainer, + FieldLabel, + Fieldset, + FieldTextArea, + FormButtonContainer, + gray3, + gray6, + PrimaryButton, +} from './Styles'; import React from 'react'; import { useParams } from 'react-router-dom'; +import { useForm } from 'react-hook-form'; import { Page } from './Page'; import { QuestionData, getQuestion } from './QuestionsData'; import { AnswerList } from './AnswerList'; +type FormData = { + content: string; +}; + export const QuestionPage = () => { const [question, setQuestion] = React.useState(null); const { questionId } = useParams(); + const { register } = useForm(); React.useEffect(() => { const doGetQuestion = async (questionId: number) => { const foundQuestion = await getQuestion(questionId); @@ -63,6 +78,27 @@ export const QuestionPage = () => { } on ${question.created.toLocaleDateString()} ${question.created.toLocaleTimeString()}`} +
+
+ + Your Answer + + + + + Submit Your Answer + + +
+
)}