refactor: QuestionListPage 에 ArticleBoard 컴포넌트 적용
This commit is contained in:
parent
d85bf5abf4
commit
e74568877f
@ -1,16 +1,16 @@
|
||||
import styles from './QuestionListPage.module.css';
|
||||
import LectureHeader from '../../components/LectureHeader/LectureHeader';
|
||||
import { SideBar, SideLink, SideItem } from '../../components/SideBar';
|
||||
import { ArticleLink } from '../../components/ArticleLink';
|
||||
import { MaxWidthLayout } from '../../components/Layout';
|
||||
import ArticleBoard from '../../components/ArticleBoard/ArticleBoard';
|
||||
|
||||
export default function QuestionListPage() {
|
||||
const notices = [
|
||||
{},
|
||||
{ title: '공지사항1', noticeDate: '7-12 오전 11:40:57' },
|
||||
{ title: '공지사하앙2', noticeDate: '7-12 오전 11:40:57' },
|
||||
{ title: '공지사하앙33', noticeDate: '7-15 오전 11:40:57' },
|
||||
{ title: '제목만 있는 경우' },
|
||||
{ title: 'Question1', noticeDate: '7-12 오전 11:40:57' },
|
||||
{ title: 'Question2', noticeDate: '7-12 오전 11:40:57' },
|
||||
{ title: '헷갈리는게 있어요', noticeDate: '7-15 오전 11:40:57' },
|
||||
{ title: '궁금궁금', noticeDate: '7-15 오전 11:40:57' },
|
||||
{ noticeDate: '날짜만 있는 경우' },
|
||||
];
|
||||
|
||||
@ -46,17 +46,11 @@ export default function QuestionListPage() {
|
||||
</SideBar>
|
||||
</aside>
|
||||
<main>
|
||||
<div className={styles.title}>
|
||||
<div className={styles.titleText}>Q&A</div>
|
||||
<button
|
||||
type="button"
|
||||
className={styles.button}
|
||||
>
|
||||
<div>ㅁ</div>
|
||||
<div className={styles.buttonText}>글쓰기</div>
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<ArticleBoard
|
||||
title="Q&A"
|
||||
canCreate={true}
|
||||
createPath="/"
|
||||
>
|
||||
{notices.map((notice) => {
|
||||
if (notice.noticeDate && notice.title) {
|
||||
return (
|
||||
@ -68,7 +62,7 @@ export default function QuestionListPage() {
|
||||
);
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
</ArticleBoard>
|
||||
</main>
|
||||
</MaxWidthLayout>
|
||||
</>
|
||||
|
@ -1,29 +0,0 @@
|
||||
.title {
|
||||
display: flex;
|
||||
padding-left: 20px;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.titleText {
|
||||
font-size: 32px;
|
||||
line-height: 1.2;
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
.button {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
padding: 12px 16px;
|
||||
background: var(--background);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.buttonText {
|
||||
font-family: inherit;
|
||||
font-size: 16px;
|
||||
line-height: 1.4;
|
||||
font-weight: 700;
|
||||
}
|
Loading…
Reference in New Issue
Block a user