Skip to content

Commit

Permalink
Update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmyta committed Oct 25, 2024
1 parent bcd1f7c commit 998c819
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,21 @@ import { getThreatIcon, getThreatSubtitle, getThreatType } from './utils';
* @param {number} props.historicThreatsCount - Number of historic threats.
* @param {boolean} props.isViewingActiveThreats - Whether the active status is selected.
* @param {boolean} props.isViewingHistoricThreats - Whether the historic status is selected.
* @param {Function} props.onThreatsStatusChange - Callback function to update the filter value.
* @param {Function} props.onStatusFilterChange - Callback function to update the filter value.
* @return {JSX.Element|null} The component or null.
*/
export function ThreatsStatusToggleGroupControl( {
activeThreatsCount,
historicThreatsCount,
isViewingActiveThreats,
isViewingHistoricThreats,
onThreatsStatusChange,
onStatusFilterChange,
}: {
activeThreatsCount: number;
historicThreatsCount: number;
isViewingActiveThreats: boolean;
isViewingHistoricThreats: boolean;
onThreatsStatusChange: ( newValue: string ) => void;
onStatusFilterChange: ( newValue: string ) => void;
} ): JSX.Element {
if ( ! ( activeThreatsCount && historicThreatsCount ) ) {
return null;
Expand All @@ -65,7 +65,7 @@ export function ThreatsStatusToggleGroupControl( {
<ToggleGroupControl
className={ styles[ 'toggle-group-control' ] }
value={ selectedValue }
onChange={ onThreatsStatusChange }
onChange={ onStatusFilterChange }
>
<ToggleGroupControlOption
value="active"
Expand Down Expand Up @@ -569,7 +569,7 @@ export default function ThreatsDataViews( {
*
* @param {string} newStatus - The new status filter value.
*/
const onThreatsStatusChange = useCallback(
const onStatusFilterChange = useCallback(
( newStatus: string ) => {
const updatedFilters = view.filters.filter( filter => filter.field !== 'status' );

Expand Down Expand Up @@ -628,7 +628,7 @@ export default function ThreatsDataViews( {
historicThreatsCount={ historicThreatsCount }
isViewingActiveThreats={ isViewingActiveThreats }
isViewingHistoricThreats={ isViewingHistoricThreats }
onThreatsStatusChange={ onThreatsStatusChange }
onStatusFilterChange={ onStatusFilterChange }
/>
}
/>
Expand Down

0 comments on commit 998c819

Please sign in to comment.