From 0b9d32b92ab283ba2a8e8a15a0288910f3ad5558 Mon Sep 17 00:00:00 2001 From: Adam Prins Date: Fri, 6 Aug 2021 08:18:04 -0400 Subject: [PATCH 1/2] add tableLoading to the main loading for DMARC Report Page --- frontend/src/DmarcReportPage.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/DmarcReportPage.js b/frontend/src/DmarcReportPage.js index a46d2e514a..3fee83a759 100644 --- a/frontend/src/DmarcReportPage.js +++ b/frontend/src/DmarcReportPage.js @@ -135,14 +135,11 @@ export default function DmarcReportPage() { ) } - // DMARC bar graph setup - let graphDisplay - // Set DMARC bar graph Loading - if (graphLoading) { - graphDisplay = ( + if (graphLoading || tableLoading) { + return ( - Yearly DMARC Graph + DMARC Report ) } @@ -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 = } // Set graph display using data if data exists From ff17ea2d4c719ec6e36b7847fca41adb1877503f Mon Sep 17 00:00:00 2001 From: Adam Prins Date: Fri, 6 Aug 2021 11:19:19 -0400 Subject: [PATCH 2/2] remove statement that always resolves to true --- frontend/src/DmarcReportPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/DmarcReportPage.js b/frontend/src/DmarcReportPage.js index 3fee83a759..ca5eb47349 100644 --- a/frontend/src/DmarcReportPage.js +++ b/frontend/src/DmarcReportPage.js @@ -144,7 +144,7 @@ export default function DmarcReportPage() { ) } - if (!graphLoading && !graphData?.findDomainByDomain?.hasDMARCReport) { + if (!graphData?.findDomainByDomain?.hasDMARCReport) { return (