From 4fa70a3fb913baaabe4a0ddcbf08855be3fab218 Mon Sep 17 00:00:00 2001 From: Nate Weller Date: Wed, 18 Dec 2024 13:19:31 -0700 Subject: [PATCH] Protect: Update Threat Icons (#40621) --- .../src/js/components/admin-section-hero/index.tsx | 8 +------- .../protect/src/js/routes/home/home-statcards.jsx | 10 ++-------- projects/plugins/protect/src/js/routes/scan/index.jsx | 3 ++- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/projects/plugins/protect/src/js/components/admin-section-hero/index.tsx b/projects/plugins/protect/src/js/components/admin-section-hero/index.tsx index 7638936db5139..119cc7e39b14a 100644 --- a/projects/plugins/protect/src/js/components/admin-section-hero/index.tsx +++ b/projects/plugins/protect/src/js/components/admin-section-hero/index.tsx @@ -66,13 +66,7 @@ AdminSectionHero.Heading = ( {

{ children } { !! icon && ( - + ) }

); diff --git a/projects/plugins/protect/src/js/routes/home/home-statcards.jsx b/projects/plugins/protect/src/js/routes/home/home-statcards.jsx index 2d1dc34cac147..fcbf75dbcf15b 100644 --- a/projects/plugins/protect/src/js/routes/home/home-statcards.jsx +++ b/projects/plugins/protect/src/js/routes/home/home-statcards.jsx @@ -136,15 +136,9 @@ const HomeStatCards = () => { if ( scanning ) { scanIcon = ; } else if ( scanError ) { - scanIcon = ; + scanIcon = ; } else { - scanIcon = ( - - ); + scanIcon = ; } let scanLabel; diff --git a/projects/plugins/protect/src/js/routes/scan/index.jsx b/projects/plugins/protect/src/js/routes/scan/index.jsx index 9b0e278349359..f419d04971633 100644 --- a/projects/plugins/protect/src/js/routes/scan/index.jsx +++ b/projects/plugins/protect/src/js/routes/scan/index.jsx @@ -38,8 +38,9 @@ const ScanPage = () => { currentScanStatus = 'active'; } + const hasActiveThreats = status && status.threats.length; const hasHistory = history && history.threats.length; - const showResults = !! status.threats.length || hasHistory; + const showResults = hasActiveThreats || hasHistory; const filters = useMemo( () => { if ( location.pathname.includes( '/scan/history' ) ) {