Skip to content
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
16 changes: 8 additions & 8 deletions frontend/src/DmarcReportPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,16 @@ export default function DmarcReportPage() {
)
}

// DMARC bar graph setup
let graphDisplay

// Set DMARC bar graph Loading
if (graphLoading) {
graphDisplay = (
if (graphLoading || tableLoading) {
return (
<LoadingMessage>
<Trans>Yearly DMARC Graph</Trans>
<Trans>DMARC Report</Trans>
</LoadingMessage>
)
}

if (!graphLoading && !graphData?.findDomainByDomain?.hasDMARCReport) {
if (!graphData?.findDomainByDomain?.hasDMARCReport) {
return (
<Box align="center" w="100%" px={4}>
<Text textAlign="center" fontSize="3xl" fontWeight="bold">
Expand All @@ -158,8 +155,11 @@ export default function DmarcReportPage() {
)
}

// DMARC bar graph setup
let graphDisplay

// Display graph query error if found
else if (graphError) {
if (graphError) {
graphDisplay = <ErrorFallbackMessage error={graphError} />
}
// Set graph display using data if data exists
Expand Down