I am trying to implement previous and next article
my getStaticPaths currently looks like this
export async function getStaticPaths() {
const articles = await fetchArticles();
const paths = articles.map((article) => ({
params: {
slug: article.slug,
},
props: article,
}));
return paths;
}
If I change to
props: {articles}
I get Cannot read properties of undefined (reading 'map')
What am I missing or doing wrong here?