Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix email guidance page #4087

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions frontend/src/guidance/EmailGuidance.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { GuidanceTagList } from './GuidanceTagList'
import { Box, ListItem, OrderedList, Text } from '@chakra-ui/react'

const EmailGuidance = ({ emailScan, dmarcPhase = 'unknown' }) => {
const dmarcScan = emailScan.dmarc.edges[0].node
const spfScan = emailScan.spf.edges[0].node
const dkimScan = emailScan.dkim.edges[0].node.results.edges[0].node
const dmarcScan = emailScan.dmarc.edges[0]?.node
const spfScan = emailScan.spf.edges[0]?.node
const dkimScan = emailScan.dkim.edges[0]?.node.results.edges[0]?.node

let dmarcSteps

Expand Down Expand Up @@ -76,23 +76,23 @@ const EmailGuidance = ({ emailScan, dmarcPhase = 'unknown' }) => {

<ScanDetails title={`DMARC`}>
<GuidanceTagList
positiveTags={dmarcScan.positiveGuidanceTags.edges}
neutralTags={dmarcScan.neutralGuidanceTags.edges}
negativeTags={dmarcScan.negativeGuidanceTags.edges}
positiveTags={dmarcScan?.positiveGuidanceTags.edges}
neutralTags={dmarcScan?.neutralGuidanceTags.edges}
negativeTags={dmarcScan?.negativeGuidanceTags.edges}
/>
</ScanDetails>
<ScanDetails title={`SPF`}>
<GuidanceTagList
positiveTags={spfScan.positiveGuidanceTags.edges}
neutralTags={spfScan.neutralGuidanceTags.edges}
negativeTags={spfScan.negativeGuidanceTags.edges}
positiveTags={spfScan?.positiveGuidanceTags.edges}
neutralTags={spfScan?.neutralGuidanceTags.edges}
negativeTags={spfScan?.negativeGuidanceTags.edges}
/>
</ScanDetails>
<ScanDetails title={`DKIM`}>
<GuidanceTagList
positiveTags={dkimScan.positiveGuidanceTags.edges}
neutralTags={dkimScan.neutralGuidanceTags.edges}
negativeTags={dkimScan.negativeGuidanceTags.edges}
positiveTags={dkimScan?.positiveGuidanceTags.edges}
neutralTags={dkimScan?.neutralGuidanceTags.edges}
negativeTags={dkimScan?.negativeGuidanceTags.edges}
/>
</ScanDetails>
</ScanCard>
Expand Down