I have a two data in cardTypeData :
0: {id: 226, obj: {…}, Slug: 'hello-0'
1: {id: 228, obj: {…}, Slug: 'hello-1'}
useEffect(() => {
let newcard = [];
console.log("cardTypeData= ",cardTypeData)
if (cardTypeData) {
cardTypeData.map((item) => {
if(item.Slug){
const requestUrl = `chartconfig/${item.Slug}/${
searchQuery?.year
? `?year=${searchQuery.year}${
searchQuery.month ? "&month=" + searchQuery.month : ""
}`
: ``
}`;
axiosRequest.get(requestUrl)
.then((res) => {
newcard.push(res.data);
})
.catch(console.log('err'))
// .catch((error)=>{
// console.log(error)
// });
}
});
}
console.log('list', newcard)
setCardData(newcard);
}, [cardTypeData]);
the console output is shown in the figure,
how to fix this issues.

here data is shown but i could not display it in html.
