Merge pull request #86 from TeamBNBN/FE/ArticlePreview

[Front-End] Fe/ArticlePreview 글 상세내용 링크 추가
This commit is contained in:
Jo Hyeonsoo 2024-07-22 17:39:32 +09:00 committed by GitHub
commit b34273992c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,18 +6,24 @@ export default function ArticlePreview({ to, title, contents = [] }) {
return ( return (
<div className={styles.wrapper}> <div className={styles.wrapper}>
<div className={styles.header}> <div className={styles.header}>
<div className={styles.title}>{title}</div> <Link
to={to}
className={styles.title}
>
{title}
</Link>
<Link to={to}>ICON</Link> <Link to={to}>ICON</Link>
</div> </div>
<div className={styles.main}> <div className={styles.main}>
{contents.map((content) => { {contents.map((content) => {
return ( return (
<div <Link
to={`${to}/${content.id}`}
key={content.id} key={content.id}
className={styles.content} className={styles.content}
> >
{content.title} {content.title}
</div> </Link>
); );
})} })}
</div> </div>