add month name to monthlytable
This commit is contained in:
@@ -49,7 +49,7 @@ const YearRainfall = () => {
|
||||
{Object.entries(data)
|
||||
.map(([month, months]) => {
|
||||
return <tr key={month}>
|
||||
<td>{month}</td>
|
||||
<td>{months[0].label}</td>
|
||||
<td>{months.find(m => m.year === (new Date).getFullYear() && m.month === Number(month))?.values}</td>
|
||||
<td>{months.find(m => m.year === ((new Date).getFullYear() - 1) && m.month === Number(month))?.values}</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user