fix: workspace dashboard duplicate keys (#803)

This commit is contained in:
Aaryan Khandelwal 2023-04-13 15:38:43 +05:30 committed by GitHub
parent 484a88d881
commit b7a7508d5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,12 +101,12 @@ export const ActivityGraph: React.FC<Props> = ({ activities }) => {
style={{ gridTemplateRows: "repeat(7, minmax(0, 1fr))" }}
ref={ref}
>
{recentDates.map((date) => {
{recentDates.map((date, index) => {
const isActive = activities?.find((a) => a.created_date === date);
return (
<Tooltip
key={date}
key={`${date}-${index}`}
tooltipContent={`${
isActive ? isActive.activity_count : 0
} activities on ${renderShortNumericDateFormat(date)}`}