2024-10-30 18:28:41 +01:00
|
|
|
import { Post } from "@/interfaces/post";
|
|
|
|
import { PostPreview } from "./post-preview";
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
posts: Post[];
|
2024-10-31 22:16:00 +01:00
|
|
|
lang: string;
|
2024-10-30 18:28:41 +01:00
|
|
|
};
|
|
|
|
|
2024-10-31 22:16:00 +01:00
|
|
|
export function MoreStories({ posts, lang }: Props) {
|
2024-10-30 18:28:41 +01:00
|
|
|
return (
|
|
|
|
<section>
|
|
|
|
<h2 className="mb-8 text-5xl md:text-7xl font-bold tracking-tighter leading-tight">
|
|
|
|
More Stories
|
|
|
|
</h2>
|
|
|
|
<div className="grid grid-cols-1 md:grid-cols-2 md:gap-x-16 lg:gap-x-32 gap-y-20 md:gap-y-32 mb-32">
|
|
|
|
{posts.map((post) => (
|
|
|
|
<PostPreview
|
|
|
|
key={post.slug}
|
2024-10-31 22:16:00 +01:00
|
|
|
title={typeof post.title === "string" ? post.title : post.title[lang]}
|
2024-10-30 18:28:41 +01:00
|
|
|
coverImage={post.coverImage}
|
|
|
|
date={post.date}
|
|
|
|
author={post.author}
|
|
|
|
slug={post.slug}
|
2024-10-31 22:16:00 +01:00
|
|
|
excerpt={typeof post.excerpt === "string" ? post.excerpt : post.excerpt[lang]}
|
2024-10-30 18:28:41 +01:00
|
|
|
/>
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
);
|
|
|
|
}
|