diff --git a/frontend/src/components/DefenceBox/DefenceBox.tsx b/frontend/src/components/DefenceBox/DefenceBox.tsx
index 150ddf7b4..8e13a8ba6 100644
--- a/frontend/src/components/DefenceBox/DefenceBox.tsx
+++ b/frontend/src/components/DefenceBox/DefenceBox.tsx
@@ -45,7 +45,6 @@ function DefenceBox({ triggeredDefences }: { triggeredDefences: string[] }) {
// update triggered defences
useEffect(() => {
- console.log("updating triggered defences: ", triggeredDefences);
// update state
const newDefences = defenceDetails.map((defenceDetail) => {
defenceDetail.isTriggered = triggeredDefences.includes(defenceDetail.id);
@@ -99,10 +98,6 @@ function DefenceBox({ triggeredDefences }: { triggeredDefences: string[] }) {
});
};
- useEffect(() => {
- console.log("defenceDetails: ", defenceDetails);
- }, [defenceDetails]);
-
return (
{defenceDetails.map((defenceDetail, index) => {
diff --git a/frontend/src/components/DefenceBox/DefenceConfiguration.tsx b/frontend/src/components/DefenceBox/DefenceConfiguration.tsx
index cd1b7761d..0600e97c6 100644
--- a/frontend/src/components/DefenceBox/DefenceConfiguration.tsx
+++ b/frontend/src/components/DefenceBox/DefenceConfiguration.tsx
@@ -12,9 +12,10 @@ function DefenceConfiguration(
setConfigurationValue: (configId: string, value: string) => void;
}
) {
- const setConfiguration = (event: React.KeyboardEvent
) => {
+ const setConfiguration = (event: React.KeyboardEvent) => {
if (event.key === "Enter") {
- setConfigurationValue(config.id, event.currentTarget.value);
+ const value = event.currentTarget.innerText.trim();
+ setConfigurationValue(config.id, value);
}
};
diff --git a/frontend/src/components/DefenceBox/DefenceMechanism.tsx b/frontend/src/components/DefenceBox/DefenceMechanism.tsx
index dcea78c50..b23e45d50 100644
--- a/frontend/src/components/DefenceBox/DefenceMechanism.tsx
+++ b/frontend/src/components/DefenceBox/DefenceMechanism.tsx
@@ -77,17 +77,19 @@ function DefenceMechanism({
{isInfoBoxVisible ? (
{defenceDetail.info}
-
- {defenceDetail.config?.map((config, index) => {
- return (
-
- );
- })}
-
+ {defenceDetail.config ? (
+
+ {defenceDetail.config.map((config, index) => {
+ return (
+
+ );
+ })}
+
+ ) : null}
) : null}
diff --git a/frontend/src/components/ModelSelectionBox/ModelSelectionBox.tsx b/frontend/src/components/ModelSelectionBox/ModelSelectionBox.tsx
index ca1b57f5e..9fbbf6084 100644
--- a/frontend/src/components/ModelSelectionBox/ModelSelectionBox.tsx
+++ b/frontend/src/components/ModelSelectionBox/ModelSelectionBox.tsx
@@ -49,7 +49,9 @@ function ModelSelectionBox() {
placeholder={modelInUse}
>
{chatModelOptions.map((model) => (
-
+
))}
;