feat: ArticleDetail answer=null 추가
This commit is contained in:
parent
e70d91e5b9
commit
889d0113f4
@ -2,7 +2,7 @@ import { Link } from 'react-router-dom';
|
||||
import styles from './ArticleDetail.module.css';
|
||||
import ArticleDetailAnswer from './ArticleDetailAnswer/ArticleDetailAnswer';
|
||||
|
||||
export default function ArticleDetail({ topic, title, author, content, answer }) {
|
||||
export default function ArticleDetail({ topic, title, author, content, answer = null }) {
|
||||
// TODO: 답변 작성 기능 추가
|
||||
console.log(answer);
|
||||
return (
|
||||
@ -25,7 +25,7 @@ export default function ArticleDetail({ topic, title, author, content, answer })
|
||||
<div>
|
||||
<p className={styles.content}>{content}</p>
|
||||
</div>
|
||||
<ArticleDetailAnswer answer={answer} />
|
||||
{answer && <ArticleDetailAnswer answer={answer} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { SideBar, SideLink, SideItem } from '../../components/SideBar';
|
||||
import { MaxWidthLayout } from '../../components/Layout';
|
||||
import { ArticleDetail } from '../../components/Article';
|
||||
|
||||
export default function LearningLectureDetailPage() {
|
||||
export default function QuestionDetailPage() {
|
||||
const lecture = {
|
||||
title: '정보처리기사 실기 완전정복',
|
||||
tutor: '박정민',
|
||||
|
Loading…
Reference in New Issue
Block a user