Skip to content

Commit

Permalink
Issue 168 - add key prop to ssh keys and certs
Browse files Browse the repository at this point in the history
Fixes console warning: Each child in a list should have a unique "key" prop

Signed-off-by: Mark Reynolds <mreynolds@redhat.com>

Fixes: #168
  • Loading branch information
mreynolds389 committed Jan 2, 2024
1 parent 9d4b7cf commit d983f32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Form/IpaCertificates.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ const IpaCertificates = (props: PropsToIpaCertificates) => {
{certificatesList !== undefined && certificatesList.length > 0
? certificatesList.map((cert, idx) => {
return (
<>
<div key={idx}>
{cert.certInfo !== undefined &&
Object.keys(cert.certInfo).length !== 0 && (
<div key={"certificate-" + idx}>
Expand All @@ -535,7 +535,7 @@ const IpaCertificates = (props: PropsToIpaCertificates) => {
/>
</div>
)}
</>
</div>
);
})
: null}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Form/IpaSshPublicKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const IpaSshPublicKeys = (props: PropsToSshPublicKeysModal) => {
{sshPublicKeysList !== undefined
? sshPublicKeysList.map((publicKey, idx) => {
return (
<>
<div key={idx}>
<Flex direction={{ default: "row" }}>
{publicKey !== "" && (
<>
Expand Down Expand Up @@ -294,7 +294,7 @@ const IpaSshPublicKeys = (props: PropsToSshPublicKeysModal) => {
</>
)}
</Flex>
</>
</div>
);
})
: null}
Expand Down

0 comments on commit d983f32

Please sign in to comment.