Skip to content

Commit

Permalink
Use error variant (#40832)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta authored Jan 3, 2025
1 parent 1db1e6c commit f672f0a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ export default function ScanReport( { dataSource, data, onChangeSelection } ): J
},
render( { item }: { item: ScanReportExtension } ) {
const scanApi = 'scan_api' === dataSource;
let variant: 'info' | 'warning' | 'success' = 'info';
let variant: 'info' | 'error' | 'success' = 'info';
let text = __(
'This item was added to your site after the most recent scan. We will check for threats during the next scheduled one.',
'jetpack-components'
);

if ( item.checked ) {
if ( item.threats.length > 0 ) {
variant = 'warning';
variant = 'error';
text = _n(
'Vulnerability detected.',
'Vulnerabilities detected.',
Expand Down

0 comments on commit f672f0a

Please sign in to comment.