refactor: cleanup vue.js global properties usage
[e-mobility-charging-stations-simulator.git] / ui / web / src / components / actions / StartTransaction.vue
index f2a3242f518b6955bb092997c3e7e1fa5382dba2..18145d8d8fad25fbc7467f2acca80aeb9fe33670 100644 (file)
@@ -9,7 +9,7 @@
     id="action-button"
     @click="
       () => {
-        uiClient
+        $uiClient
           .startTransaction(hashId, convertToInt(connectorId), state.idTag)
           .then(() => {
             $toast.success('Transaction successfully started')
@@ -29,7 +29,7 @@
 </template>
 
 <script setup lang="ts">
-import { getCurrentInstance, ref } from 'vue'
+import { ref } from 'vue'
 import Button from '@/components/buttons/Button.vue'
 import { convertToInt } from '@/composables'
 
@@ -42,8 +42,6 @@ defineProps<{
 const state = ref<{ idTag: string }>({
   idTag: ''
 })
-
-const uiClient = getCurrentInstance()?.appContext.config.globalProperties.$uiClient
 </script>
 
 <style>