Skip to content

Commit d8d892f

Browse files
committed
Add key
1 parent 454acc3 commit d8d892f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/Chart.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ type Props = {
1010
function Hearts({ num }: { num: number }) {
1111
const hearts = [];
1212
for (let i = 0; i < num; i++) {
13-
hearts.push(<FaHeart className="inline mx-0.5" size={16} />);
13+
hearts.push(
14+
<FaHeart key={i} className="inline mx-0.5" size={16} />
15+
);
1416
}
1517
return <>{hearts}</>;
1618
}

0 commit comments

Comments
 (0)