Skip to content

Commit

Permalink
Protect: Remove database category from threats navigation (#39467)
Browse files Browse the repository at this point in the history
  • Loading branch information
nateweller authored and gogdzl committed Oct 25, 2024
1 parent cf89e1e commit 03ba5b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: removed

Security Scanning: disabled database threat category
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
warning as warningIcon,
color as themesIcon,
code as filesIcon,
grid as databaseIcon,
} from '@wordpress/icons';
import { useCallback, useMemo } from 'react';
import useAnalyticsTracks from '../../hooks/use-analytics-tracks';
Expand All @@ -19,12 +18,7 @@ const ThreatsNavigation = ( { selected, onSelect, sourceType = 'scan', statusFil
const {
results: { plugins, themes },
counts: {
current: {
threats: numThreats,
core: numCoreThreats,
files: numFilesThreats,
database: numDatabaseThreats,
},
current: { threats: numThreats, core: numCoreThreats, files: numFilesThreats },
},
} = useProtectData( { sourceType, filter: { status: statusFilter } } );

Expand All @@ -51,10 +45,6 @@ const ThreatsNavigation = ( { selected, onSelect, sourceType = 'scan', statusFil
recordEvent( 'jetpack_protect_navigation_file_click' );
}, [ recordEvent ] );

const trackNavigationClickDatabase = useCallback( () => {
recordEvent( 'jetpack_protect_navigation_database_click' );
}, [ recordEvent ] );

const allLabel = useMemo( () => {
if ( statusFilter === 'fixed' ) {
return __( 'All fixed threats', 'jetpack-protect' );
Expand Down Expand Up @@ -131,15 +121,6 @@ const ThreatsNavigation = ( { selected, onSelect, sourceType = 'scan', statusFil
onClick={ trackNavigationClickFiles }
checked={ true }
/>
<NavigationItem
id="database"
label={ __( 'Database', 'jetpack-protect' ) }
icon={ databaseIcon }
badge={ numDatabaseThreats }
disabled={ numDatabaseThreats <= 0 }
onClick={ trackNavigationClickDatabase }
checked={ true }
/>
</>
) }
</Navigation>
Expand Down

0 comments on commit 03ba5b6

Please sign in to comment.