fix(frontend): Avoid using the index of an array as key property in an element

This commit is contained in:
tigattack
2025-09-24 23:55:25 +01:00
parent 74f42b5bee
commit 53f8471d75
4 changed files with 11 additions and 8 deletions

View File

@@ -2139,7 +2139,7 @@ const BulkAssignModal = ({
</p>
<div className="max-h-32 overflow-y-auto bg-secondary-50 rounded-md p-3">
{selectedHostNames.map((friendlyName, index) => (
<div key={index} className="text-sm text-secondary-700">
<div key={friendlyName} className="text-sm text-secondary-700">
{friendlyName}
</div>
))}
@@ -2250,7 +2250,7 @@ const BulkDeleteModal = ({
<div className="max-h-32 overflow-y-auto bg-secondary-50 dark:bg-secondary-700 rounded-md p-3">
{selectedHostNames.map((friendlyName, index) => (
<div
key={index}
key={friendlyName}
className="text-sm text-secondary-700 dark:text-secondary-300"
>
{friendlyName}