Can't build my app since I use strapi

System Information
  • Strapi Version: v4.5.5
  • Operating System: MacOS
  • Database: MySQL
  • Node Version: v16.16.0
  • NPM Version: 8.11.0
  • Yarn Version: 1.22.19

Hello,

I followed this tutorial : Strapi - Build a blog using Strapi and Next.js,
Everything goes well, but not when I what to build my application …

In fact, I can’t build my application because of the data that I fetch:
Generating static pages (0/13)TypeError: Cannot read properties of undefined (reading ‘data’)

But I might understood that I can’t pass props that I fetched to my components (getStaticProps can only be used in page).

But I have no idea how I can do to use this fetched data in my component and be able to build my app.

Thank you for your help,
Thomas