Hey everyone, I'm relatively new to Next.js and currently learning my ways around the app directory and the features.
Right now I am not sure how to implement contentful and map the items. Here's how I am doing it right now and I realized that getStaticProps is not available in the app router. Any help would be very much appreciated.
Here is the code that I have:
export async function getStaticProps() {
const client = createClient({
space: process.env.CONTENTFUL_SPACE_ID,
accessToken: process.env.CONTENTFUL_ACCESS_KEY,
})
const res = await client.getEntries({
content_type: 'resourcesPage'
})
return {
props: {
resources: res.items
}
}
}



