Hi,
I am currently working on a project which involves a Strapi backend, which runs using docker-compose, and a Next.js frontend, which runs in a docker container. I have tried to fetch from the API using Axios and getStaticProps(), however, I always return an error in which the “data.attributes.x is undefined”. The code is below.
All resolved! Just an issue with my variable namings being incorrect - should have been data.data.attributes.x instead of just a single data. I have now renamed the data variable so it’s less confusing…