瀏覽代碼

:wrench: Replace fake values by empty slots

DricomDragon 7 月之前
父節點
當前提交
340942f28e
共有 1 個文件被更改,包括 1 次插入4 次删除
  1. 1 4
      dev-front/src/mech/squad/Squad.tsx

+ 1 - 4
dev-front/src/mech/squad/Squad.tsx

@@ -26,11 +26,8 @@ function isSquadFull(squad: Mech[]) {
 
 function Squad({pickObservers} : {pickObservers: {[key: string] : MechObserver}}) {
 
-    const it1: Mech = {id: 1, name: 'HelloType', kind: 'K1', health: 3};
-    const it2: Mech = {id: 2, name: 'Giant Mech', kind: 'K1', health: 3};
-    const it3: Mech = {id: 3, name: 'Techno-prop', kind: 'K1', health: 4};
     const placeHolder: Mech = {id: -1, name: 'Empty slot', kind: '_', health: 0};
-    const [squadMechs, setSquadMechs] = useState([it1, it2, it3]);
+    const [squadMechs, setSquadMechs] = useState([placeHolder, placeHolder, placeHolder]);
 
     function putInFreeSlot(mech: Mech, squad: Mech[]): Mech[] {
         const freeSlotIndex = squad.findIndex(isEmptySlot);