Currently, I am attempting to display data fetched from STRAPI using Graphql and Next.js.
Fortunately, my event Adapter is functioning perfectly.
However, when trying to showcase this data on the UI, an error occurs stating event.map is not a function.
While I am able to obtain the same outcome in the front-end, the issue lies with the map function.
console.log:
const eventsAd = eventsAdapter(data);
console.log("events data", eventsAd)
Result - (IMG):
https://i.sstatic.net/b9GBn.png
Data result in the console - (IMG).
https://i.sstatic.net/Sjxar.png
Map that i created:
<div>
{eventsAd.map((event) => {
return (
<>
<h1>{event.title}</h1>
</>
);
})}
</div>
Error code:
https://i.sstatic.net/eCQQa.png