Im getting this error, "The type ‘{ data: dataProp[]; }’ cannot be assigned to type ‘IntrinsicAttributes & dataProp’.
A property ‘data’ does not exist on type ‘IntrinsicAttributes & dataProp’."
On the red arrow if i use "| any" is working so i think the problem is there, a type is needed.
>Solution :
In one place you using array of objects in else just object.
Change "Cards = {data: dataProp}" on "Cards = {data: dataProp[]}"

