2 <h2>Action Add Charging Stations</h2>
5 <script setup lang="ts">
6 import { getCurrentInstance, onMounted } from 'vue'
8 const app = getCurrentInstance()
9 const uiClient = app?.appContext.config.globalProperties.$uiClient
14 .then((response: ResponsePayload) => {
15 if (app != null && app.appContext.config.globalProperties.$templates == null) {
16 app.appContext.config.globalProperties.$templates = response.templates
19 .catch((error: Error) => {
20 // TODO: add code for UI notifications or other error handling logic
21 console.error('Error at fetching charging station templates:', error)