refactor: cleanup vue.js global properties usage
[e-mobility-charging-stations-simulator.git] / ui / web / src / components / actions / SetSupervisionUrl.vue
index 2a419677c84b176716ff8722d37ca32a27602263..887b1d4ce42bee2b0a0dd86e910fc4c455081c76 100644 (file)
@@ -14,7 +14,7 @@
     id="action-button"
     @click="
       () => {
-        uiClient
+        $uiClient
           .setSupervisionUrl(hashId, state.supervisionUrl)
           .then(() => {
             $toast.success('Supervision url successfully set')
@@ -34,7 +34,7 @@
 </template>
 
 <script setup lang="ts">
-import { getCurrentInstance, ref } from 'vue'
+import { ref } from 'vue'
 import Button from '@/components/buttons/Button.vue'
 
 defineProps<{
@@ -45,8 +45,6 @@ defineProps<{
 const state = ref<{ supervisionUrl: string }>({
   supervisionUrl: ''
 })
-
-const uiClient = getCurrentInstance()?.appContext.config.globalProperties.$uiClient
 </script>
 
 <style>