|
@@ -4,11 +4,10 @@ import Mech from '../../Mech';
|
|
|
|
|
|
type MemberProps = {
|
|
|
mech: Mech;
|
|
|
- remover: (index: number) => void;
|
|
|
- index: number;
|
|
|
+ remover: () => void;
|
|
|
};
|
|
|
|
|
|
-function Member({mech, remover, index} : MemberProps) {
|
|
|
+function Member({mech, remover} : MemberProps) {
|
|
|
return (
|
|
|
<div className='mech-member'>
|
|
|
<h3>{mech.name}</h3>
|
|
@@ -19,7 +18,7 @@ function Member({mech, remover, index} : MemberProps) {
|
|
|
<li>Health : {mech.health}</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
- <button onClick={event => remover(index)}>Remove</button>
|
|
|
+ <button onClick={event => remover()}>Remove</button>
|
|
|
</div>
|
|
|
)
|
|
|
}
|