Skip to content

Commit

Permalink
Protect: Update Threat Icons (#40621)
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller authored Dec 18, 2024
1 parent 113aebc commit 4fa70a3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,7 @@ AdminSectionHero.Heading = ( {
<H3 mb={ 1 } { ...props }>
{ children }
{ !! icon && (
<ShieldIcon
height={ 38 }
variant={ icon }
outline
fill="default"
className={ styles[ 'heading-icon' ] }
/>
<ShieldIcon height={ 38 } variant={ icon } className={ styles[ 'heading-icon' ] } />
) }
</H3>
);
Expand Down
10 changes: 2 additions & 8 deletions projects/plugins/protect/src/js/routes/home/home-statcards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,9 @@ const HomeStatCards = () => {
if ( scanning ) {
scanIcon = <Spinner />;
} else if ( scanError ) {
scanIcon = <ShieldIcon variant="error" height={ ICON_HEIGHT } />;
scanIcon = <ShieldIcon variant="error" outline height={ ICON_HEIGHT } />;
} else {
scanIcon = (
<ShieldIcon
variant={ numThreats ? 'warning' : 'success' }
height={ ICON_HEIGHT }
color={ numThreats ? '#F0B849' : '#069E08' }
/>
);
scanIcon = <ShieldIcon variant={ numThreats ? 'error' : 'success' } height={ ICON_HEIGHT } />;
}

let scanLabel;
Expand Down
3 changes: 2 additions & 1 deletion projects/plugins/protect/src/js/routes/scan/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) ) {
Expand Down

0 comments on commit 4fa70a3

Please sign in to comment.