Chap05 -> Using route parameters -> Implementiing more of the question page -> Implement JSX for Question Page component by adding container element for the page and question title
parent
a2f0fb0522
commit
b5f12380b3
|
@ -20,5 +20,28 @@ export const QuestionPage = () => {
|
||||||
doGetQuestion(Number(questionId));
|
doGetQuestion(Number(questionId));
|
||||||
}
|
}
|
||||||
}, [questionId]);
|
}, [questionId]);
|
||||||
return <Page>Question Page {questionId}</Page>;
|
return (
|
||||||
|
<Page>
|
||||||
|
<div
|
||||||
|
css={css`
|
||||||
|
background-color: white;
|
||||||
|
padding: 15px 20px 20px 20px;
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid ${gray6};
|
||||||
|
box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.16);
|
||||||
|
`}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
css={css`
|
||||||
|
font-size: 19px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin: 10px 0px 5px;
|
||||||
|
`}
|
||||||
|
>
|
||||||
|
{question === null ? '' : question.title}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
Question Page {questionId}
|
||||||
|
</Page>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue