From a51437c7cc0632d655db28acee9711f1afb710e8 Mon Sep 17 00:00:00 2001 From: Jason Zhu Date: Wed, 30 Mar 2022 14:14:23 +1100 Subject: [PATCH] Chap05 -> Using route parameters -> Implementing more of the question page -> 2 & 3 & 4: Create a state for question --- QandA/frontend/src/QuestionPage.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/QandA/frontend/src/QuestionPage.tsx b/QandA/frontend/src/QuestionPage.tsx index 38c17dc..40465b5 100644 --- a/QandA/frontend/src/QuestionPage.tsx +++ b/QandA/frontend/src/QuestionPage.tsx @@ -1,9 +1,15 @@ +/** @jsxImportSource @emotion/react */ +import { css } from '@emotion/react'; +import { gray3, gray6 } from './Styles'; + import React from 'react'; import { useParams } from 'react-router-dom'; import { Page } from './Page'; +import { QuestionData, getQuestion } from './QuestionsData'; export const QuestionPage = () => { + const [question, setQuestion] = React.useState(null); const { questionId } = useParams(); return Question Page {questionId}; };