init
This commit is contained in:
commit
04099b0f05
35 changed files with 1742 additions and 0 deletions
26
components/ArticleListItem.tsx
Normal file
26
components/ArticleListItem.tsx
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import Link from "next/link"
|
||||
import type { ArticleItem} from "@/types";
|
||||
|
||||
interface Props {
|
||||
category: string,
|
||||
articles: ArticleItem[]
|
||||
}
|
||||
|
||||
const ArticleItemList = ({ category, articles }: Props) => {
|
||||
return (
|
||||
<>
|
||||
<div className={"flex flex-col gap-5"}>
|
||||
<h2 className={"font-cormorantGaramond text-4xl"}>{category}</h2>
|
||||
<div className={"flex flex-col gap-2.5 font-poppins text-lg"}>
|
||||
{articles.map((article, id) => (
|
||||
<Link href={`/blog/${article.id}`} key={id} className={"hover:text-nord-12 transition duration-250"}>
|
||||
{article.title}
|
||||
</Link>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default ArticleItemList
|
||||
Loading…
Add table
Add a link
Reference in a new issue