Chap05 -> Using route parameters -> Implementing more of the question page -> 2 & 3 & 4: Create a state for question
parent
3fb4435d68
commit
de5e78e621
|
@ -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<QuestionData | null>(null);
|
||||
const { questionId } = useParams();
|
||||
return <Page>Question Page {questionId}</Page>;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue