refactor(ui): cleanup props usage
[e-mobility-charging-stations-simulator.git] / ui / web / src / components / actions / SetSupervisionUrl.vue
index 33b6767bd093b4d9d4ff7ecb2d358615d9bb4994..2b7ef4a251a5b6c846a696da34038362f7e95147 100644 (file)
@@ -16,7 +16,7 @@
     @click="
       () => {
         uiClient
-          .setSupervisionUrl(props.hashId, state.supervisionUrl)
+          .setSupervisionUrl(hashId, state.supervisionUrl)
           .then(() => {
             $toast.success('Supervision url successfully set')
           })
   >
     Set Supervision Url
   </Button>
-  <Button id="action-button" @click="$router.push({ name: 'charging-stations' })">Cancel</Button>
 </template>
 
 <script setup lang="ts">
-import { defineProps, getCurrentInstance, reactive } from 'vue'
+import { getCurrentInstance, ref } from 'vue'
 import Button from '@/components/buttons/Button.vue'
 
-const props = defineProps<{
+defineProps<{
   hashId: string
   chargingStationId: string
 }>()
 
-const state = reactive({
+const state = ref({
   supervisionUrl: ''
 })