diff --git a/frontend/src/components/AttackBox/AttackBox.jsx b/frontend/src/components/AttackBox/AttackBox.tsx similarity index 100% rename from frontend/src/components/AttackBox/AttackBox.jsx rename to frontend/src/components/AttackBox/AttackBox.tsx diff --git a/frontend/src/components/AttackBox/AttackMechanism.jsx b/frontend/src/components/AttackBox/AttackMechanism.tsx similarity index 75% rename from frontend/src/components/AttackBox/AttackMechanism.jsx rename to frontend/src/components/AttackBox/AttackMechanism.tsx index 2fc8b12ce..5cba1e7a6 100644 --- a/frontend/src/components/AttackBox/AttackMechanism.jsx +++ b/frontend/src/components/AttackBox/AttackMechanism.tsx @@ -1,14 +1,15 @@ +import { AttackInfo } from "../../models/attack"; import "../StrategyBox/StrategyMechanism.css"; import React from "react"; -function DefenceMechanism(props) { +function DefenceMechanism({ attack }: { attack: AttackInfo }) { const [isInfoBoxVisible, setIsInfoBoxVisible] = React.useState(false); return (
- {props.attack.name} + {attack.name} { @@ -22,7 +23,7 @@ function DefenceMechanism(props) {
{isInfoBoxVisible ? ( -
{props.attack.info}
+
{attack.info}
) : null}