import PostPreview from "../components/post-preview"; export default function MoreStories({ title, posts }) { return (

{title}

{posts.map((post) => ( ))}
); } // 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, }; };