Skip to content

Commit ee31fd3

Browse files
committed
Protect: Update Threat Icons (#40621)
1 parent de4633b commit ee31fd3

File tree

3 files changed

+5
-16
lines changed

3 files changed

+5
-16
lines changed

projects/plugins/protect/src/js/components/admin-section-hero/index.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,7 @@ AdminSectionHero.Heading = ( {
6666
<H3 mb={ 1 } { ...props }>
6767
{ children }
6868
{ !! icon && (
69-
<ShieldIcon
70-
height={ 38 }
71-
variant={ icon }
72-
outline
73-
fill="default"
74-
className={ styles[ 'heading-icon' ] }
75-
/>
69+
<ShieldIcon height={ 38 } variant={ icon } className={ styles[ 'heading-icon' ] } />
7670
) }
7771
</H3>
7872
);

projects/plugins/protect/src/js/routes/home/home-statcards.jsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,9 @@ const HomeStatCards = () => {
136136
if ( scanning ) {
137137
scanIcon = <Spinner />;
138138
} else if ( scanError ) {
139-
scanIcon = <ShieldIcon variant="error" height={ ICON_HEIGHT } />;
139+
scanIcon = <ShieldIcon variant="error" outline height={ ICON_HEIGHT } />;
140140
} else {
141-
scanIcon = (
142-
<ShieldIcon
143-
variant={ numThreats ? 'warning' : 'success' }
144-
height={ ICON_HEIGHT }
145-
color={ numThreats ? '#F0B849' : '#069E08' }
146-
/>
147-
);
141+
scanIcon = <ShieldIcon variant={ numThreats ? 'error' : 'success' } height={ ICON_HEIGHT } />;
148142
}
149143

150144
let scanLabel;

projects/plugins/protect/src/js/routes/scan/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ const ScanPage = () => {
3838
currentScanStatus = 'active';
3939
}
4040

41+
const hasActiveThreats = status && status.threats.length;
4142
const hasHistory = history && history.threats.length;
42-
const showResults = !! status.threats.length || hasHistory;
43+
const showResults = hasActiveThreats || hasHistory;
4344

4445
const filters = useMemo( () => {
4546
if ( location.pathname.includes( '/scan/history' ) ) {

0 commit comments

Comments
 (0)