mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
Fix Each child in a list should have a unique "key" prop warnings in unit tests
This commit is contained in:
parent
24a903142a
commit
61f0edc5e8
@ -58,13 +58,13 @@ function JobListCancelButton({ i18n, jobsToCancel, onCancel }) {
|
||||
one="You do not have permission to cancel the following job:"
|
||||
other="You do not have permission to cancel the following jobs:"
|
||||
/>
|
||||
{cannotCancelPermissions.map((job, i) =>
|
||||
i === cannotCancelPermissions.length - 1 ? (
|
||||
<strong> {job}</strong>
|
||||
) : (
|
||||
<strong> {job},</strong>
|
||||
)
|
||||
)}
|
||||
{cannotCancelPermissions.map((job, i) => (
|
||||
<strong key={job}>
|
||||
{' '}
|
||||
{job}
|
||||
{i !== cannotCancelPermissions.length - 1 ? ',' : ''}
|
||||
</strong>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
{cannotCancelNotRunning.length > 0 && (
|
||||
@ -74,13 +74,13 @@ function JobListCancelButton({ i18n, jobsToCancel, onCancel }) {
|
||||
one="You cannot cancel the following job because it is not running:"
|
||||
other="You cannot cancel the following jobs because they are not running:"
|
||||
/>
|
||||
{cannotCancelNotRunning.map((job, i) =>
|
||||
i === cannotCancelNotRunning.length - 1 ? (
|
||||
<strong> {job}</strong>
|
||||
) : (
|
||||
<strong> {job},</strong>
|
||||
)
|
||||
)}
|
||||
{cannotCancelNotRunning.map((job, i) => (
|
||||
<strong key={job}>
|
||||
{' '}
|
||||
{job}
|
||||
{i !== cannotCancelNotRunning.length - 1 ? ',' : ''}
|
||||
</strong>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@ -82,9 +82,9 @@ function ScheduleListItem({
|
||||
{Boolean(isMissingInventory || isMissingSurvey) && (
|
||||
<span>
|
||||
<Tooltip
|
||||
content={[isMissingInventory, isMissingSurvey].map(message => (
|
||||
<div key={message}>{message}</div>
|
||||
))}
|
||||
content={[isMissingInventory, isMissingSurvey].map(message =>
|
||||
message ? <div key={message}>{message}</div> : null
|
||||
)}
|
||||
position="right"
|
||||
>
|
||||
<ExclamationTriangleIcon />
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user