refactor(ui): cleanup props usage
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 18 Feb 2024 10:00:40 +0000 (11:00 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 18 Feb 2024 10:00:40 +0000 (11:00 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
ui/web/src/components/actions/AddChargingStations.vue
ui/web/src/components/charging-stations/CSTable.vue

index 164518b1f70e7fd8590d1b9b6dc1ab63998f4da9..387d8a1a7110860e55a954878bc6b874403e21ed 100644 (file)
@@ -11,7 +11,7 @@
     id="number-of-stations"
     v-model="state.numberOfStations"
     type="text"
-    name="number-of-station"
+    name="number-of-stations"
     placeholder="number of stations"
   />
   <br />
@@ -37,6 +37,7 @@
 <script setup lang="ts">
 import { getCurrentInstance, onMounted, reactive } from 'vue'
 import Button from '@/components/buttons/Button.vue'
+import type { ResponsePayload } from '@/types'
 
 const state = reactive({
   ready: false,
index f8e3bf8b9fa2b0d7e77af8ac72fbb7d0966f893d..cc826287e2384f7600d1494ca8a5e18f4917f950 100644 (file)
@@ -20,7 +20,7 @@
     </thead>
     <tbody id="cs-table__body">
       <CSData
-        v-for="chargingStation in props.chargingStations"
+        v-for="chargingStation in chargingStations"
         :key="chargingStation.stationInfo?.hashId"
         :charging-station="chargingStation"
       />
@@ -32,7 +32,7 @@
 import CSData from '@/components/charging-stations/CSData.vue'
 import type { ChargingStationData } from '@/types'
 
-const props = defineProps<{
+defineProps<{
   chargingStations: ChargingStationData[]
 }>()
 </script>