const { data } = await useAsyncData('overview', async () => {
await FETCH_OVERVIEW('ideas');
const reqs = OVERVIEWS.value.ideas?.featuredThemes.map((theme: any) => FETCH_IDEAS_BY_THEME(theme.value)); // <-- FETCH_IDEAS_BY_THEME is not being read and the function stalls here
const { query } = useRoute();
const filters = GET_FILTERS_BY_SLUG('ideas', query.filters as string[]);
if (filters.length) {
reqs.push(FETCH_FILTERED_IDEAS(filters));
}
await Promise.allSettled(reqs);
return { filters };
});
const { data } = await useAsyncData('overview', async () => {
await FETCH_OVERVIEW('ideas');
const reqs = OVERVIEWS.value.ideas?.featuredThemes.map((theme: any) => FETCH_IDEAS_BY_THEME(theme.value)); // <-- FETCH_IDEAS_BY_THEME is not being read and the function stalls here
const { query } = useRoute();
const filters = GET_FILTERS_BY_SLUG('ideas', query.filters as string[]);
if (filters.length) {
reqs.push(FETCH_FILTERED_IDEAS(filters));
}
await Promise.allSettled(reqs);
return { filters };
});