From c5499d8ef842f99e9c0065a1518789038a0ffda1 Mon Sep 17 00:00:00 2001 From: dkmyta Date: Sat, 21 Dec 2024 13:35:32 -0800 Subject: [PATCH] Add functionality to return to all fixers --- .../components/threats-modal/index.tsx | 2 ++ .../threats-modal/styles.module.scss | 4 ++++ .../threats-modal/threat-actions.tsx | 24 +++++++++++++++++-- .../threats-modal/threat-fix-confirmation.tsx | 16 +++++++++++-- 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/projects/js-packages/components/components/threats-modal/index.tsx b/projects/js-packages/components/components/threats-modal/index.tsx index 3b31f05204a31..9936021a99841 100644 --- a/projects/js-packages/components/components/threats-modal/index.tsx +++ b/projects/js-packages/components/components/threats-modal/index.tsx @@ -9,6 +9,7 @@ import ThreatFixConfirmation from './threat-fix-confirmation'; interface ThreatModalContextType { closeModal: () => void; + currentThreats: Threat[]; threatsList: Threat[]; setThreatsList: Dispatch< SetStateAction< Threat[] > >; isBulk: boolean; @@ -110,6 +111,7 @@ export default function ThreatsModal( { { +const ThreatActions = ( { + selectedThreats, + canReturnToBulk, + viewBulkThreats, +}: { + selectedThreats: Threat[]; + canReturnToBulk: boolean; + viewBulkThreats: () => void; +} ): JSX.Element => { const { closeModal, + currentThreats, isBulk, actionToConfirm, handleFixThreatClick, @@ -66,6 +77,15 @@ const ThreatActions = ( { selectedThreats }: { selectedThreats: Threat[] } ): JS const renderIndividualActions = () => ( <> + { canReturnToBulk && ( + + ) } { firstThreat.status === 'ignored' && (