diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 03c358881..6c1f3c215 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -130,11 +130,13 @@ function App() { return (
+ {/* hide defence box on phases 0 and 1. only allow configuration in sandbox */} {/* hide defence box on phases 0 and 1 */} {(currentPhase === PHASE_NAMES.PHASE_2 || currentPhase === PHASE_NAMES.SANDBOX) && ( 2 ? true : false} triggeredDefences={triggeredDefences} defenceActivated={defenceActivated} defenceDeactivated={defenceDeactivated} diff --git a/frontend/src/components/DefenceBox/DefenceBox.tsx b/frontend/src/components/DefenceBox/DefenceBox.tsx index 93088f582..375643113 100644 --- a/frontend/src/components/DefenceBox/DefenceBox.tsx +++ b/frontend/src/components/DefenceBox/DefenceBox.tsx @@ -12,11 +12,13 @@ import { DefenceConfig, DefenceInfo } from "../../models/defence"; function DefenceBox({ defences, triggeredDefences, + showConfigurations, defenceActivated, defenceDeactivated, }: { defences: DefenceInfo[]; triggeredDefences: string[]; + showConfigurations: boolean; defenceActivated: (defenceInfo: DefenceInfo) => void; defenceDeactivated: (defenceInfo: DefenceInfo) => void; }) { @@ -127,6 +129,7 @@ function DefenceBox({ void; setDefenceInactive: (defenceId: string) => void; setDefenceConfiguration: ( @@ -92,7 +94,8 @@ function DefenceMechanism({ {isInfoBoxVisible ? (
{defenceDetail.info}
- {defenceDetail.config ? ( + + {defenceDetail.config && showConfigurations ? (
{defenceDetail.config.map((config) => { return ( @@ -105,6 +108,7 @@ function DefenceMechanism({ })}
) : null} + {isConfigured ? (
{configValidated ? (