Skip to content

Commit d3bb39d

Browse files
add tableLoading to the main loading for DMARC Report Page (canada-ca#2794)
* add tableLoading to the main loading for DMARC Report Page * remove statement that always resolves to true
1 parent 27974f3 commit d3bb39d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

frontend/src/DmarcReportPage.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,16 @@ export default function DmarcReportPage() {
135135
)
136136
}
137137

138-
// DMARC bar graph setup
139-
let graphDisplay
140-
141138
// Set DMARC bar graph Loading
142-
if (graphLoading) {
143-
graphDisplay = (
139+
if (graphLoading || tableLoading) {
140+
return (
144141
<LoadingMessage>
145-
<Trans>Yearly DMARC Graph</Trans>
142+
<Trans>DMARC Report</Trans>
146143
</LoadingMessage>
147144
)
148145
}
149146

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

158+
// DMARC bar graph setup
159+
let graphDisplay
160+
161161
// Display graph query error if found
162-
else if (graphError) {
162+
if (graphError) {
163163
graphDisplay = <ErrorFallbackMessage error={graphError} />
164164
}
165165
// Set graph display using data if data exists

0 commit comments

Comments
 (0)