import * as React from 'react'
import { report, valueColor } from './Constant'
import StatCard from './StatCard'
export default function ListOfStat() {
return (
<div className="w-11/12 mx-auto mt-10 grid gap-2">
{report.casese.map((stat, index) => {
const { label, value, delta } = stat
return (
<StatCard stat={stat} key={index} valueColor={valueColor[index]} />
)
})}
</div>
)
}
Can you give me a hand with this? I'd appreciate it. Thank you in advance. I've tried everything to solve it. The code was taken from the tutorial at this link: https://www.youtube.com/watch?v=nZPrwNK-tz8
The issue I'm facing is described below:
Binding element 'stat' implicitly has an 'any' type. TS7031
1 | import React from 'react'
2 |
> 3 | export default function StatCard({ stat, valueColor }) {
| ^
4 | const { label, value, delta } = stat
5 | return (
6 | <div className="h-28 w-full bg-grey-200 rounded flex items-center p-5 ">