Closed naira-ge closed 2 years ago
I think the only issue is with the categories fetching using Promise.all
Change it to this and it should work:
let categoriesData = [] for (const categoryType of categoryTypes) { categoriesData.push(await getDataByCategory(categoryType?.id)) }
cc @jazibsawar
I've opened a PR for the fix in the cosmic module. Promise.all
will perform the requests parallelly which in my opinion is a better approach in this scenario.
The latest updates on your projects. Learn more about Vercel for Git ↗︎