From the course: The Freelance Stack: Real Project with Next.js and Strapi

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Render InfoBlocks on page

Render InfoBlocks on page

So, the moment has come. We're now going to use the data from Strapi to actually display something on the website. So, we're going to get rid of the infoblock data in here because we don't need that anymore anyway. We have our infoblock data that is an array and in this case here for the main page it gives us two elements and both of these elements should turn into the actual info blocks. So let's do that first. We don't actually need, we're not going to have this kind of structure anymore because the idea is also that the client can potentially put in more and more info blocks, right? If the main page should have like four or five sections they should be able to do that through Strapi. So what we're going to going to be doing instead is we're going to say info block data dot map so for each one for each element we're now going to return a new info block and if the last video was already really difficult for you again that is totally okay you're going to see the pattern again and…

Contents