Skip to content

Commit

Permalink
Add missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
FestiveKyle committed Oct 21, 2024
1 parent 883b031 commit 48c7b3a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions frontend/src/guidance/GuidancePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,12 @@ function GuidancePage() {
</Text>
{organizations.edges.map(({ node }, idx) => {
return (
<>
<Link as={RouteLink} to={`/organizations/${node.slug}`} key={idx}>
<React.Fragment key={idx}>
<Link as={RouteLink} to={`/organizations/${node.slug}`}>
{node.name} ({node.acronym})
</Link>
{idx !== organizations.edges.length - 1 && <Text mr="1">,</Text>}
</>
</React.Fragment>
)
})}
</Flex>
Expand Down
28 changes: 12 additions & 16 deletions frontend/src/guidance/WebTLSResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,16 @@ export function WebTLSResults({ tlsResult }) {
<Trans>The following ciphers are from known weak protocols and must be disabled:</Trans>
</Text>
{weakProtocols?.map((protocol) => {
return (
<>
{rest[protocol]?.map(({ name }, idx) => {
return (
<Flex key={idx} {...cipherStyleProps}>
<Flex align="center" minW="50%">
<Text color="weak">{name}</Text>
</Flex>
<Text color="weak">{weakProtocolNames[protocol]}</Text>
</Flex>
)
})}
</>
)
return rest[protocol]?.map(({ name }, idx) => {
return (
<Flex key={`${protocol}-${idx}`} {...cipherStyleProps}>
<Flex align="center" minW="50%">
<Text color="weak">{name}</Text>
</Flex>
<Text color="weak">{weakProtocolNames[protocol]}</Text>
</Flex>
)
})
})}
</Box>
) : (
Expand Down Expand Up @@ -497,10 +493,10 @@ export function WebTLSResults({ tlsResult }) {
</Text>
{sanList.map((san, idx) => {
return (
<>
<React.Fragment key={idx}>
{san}
{idx < sanList.length - 1 && ', '}
</>
</React.Fragment>
)
})}
</Flex>
Expand Down

0 comments on commit 48c7b3a

Please sign in to comment.