fetch calls in getStaticProps not returning anything
as you can see in first image the returned value is empty array, this only happens when I call the getImages function in second image. How can I get the correct values?
2 Replies
So data is being returned empty?
If so, my guess is that the getImages function is breaking
And if you're using next, check the server console for these errors, not the browser console
Or maybe the error is within the declaration of the x object itself, like you trying to access an undefined somewhere
Id you can't see any errors, log all the objects
The getImages function works when I call it on the client side but breaks when I call it inside getStaticProps