silverwolf-x's picture
download
raw
1.07 kB
import PostPreview from "../components/post-preview";
export default function MoreStories({ title, posts }) {
return (
<section>
<h2 className="mb-8 text-6xl md:text-7xl font-bold tracking-tighter leading-tight">
{title}
</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}
title={post.title}
coverImage={post.coverImage}
date={post.date}
author={post.author}
slug={post.slug}
excerpt={post.excerpt}
/>
))}
</div>
</section>
);
}
// The data returned here will be send as `props` to the component
MoreStories.getCustomInitialProps = async function ({
client,
item,
pageInSitemap,
}) {
const postToExcludeContentID = pageInSitemap.contentID ?? -1;
const posts = await client.getPostsForMoreStories({ postToExcludeContentID });
return {
title: item.fields.title,
posts,
};
};

Xet Storage Details

Size:
1.07 kB
·
Xet hash:
ef9170cf532e5c66063f4be2e700e02be677f3323799fb1e88e65834f515f6da

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.