From 86545028054a9b13982500366c51e7ea2503a4eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 27 Feb 2024 01:38:32 +0100 Subject: [PATCH] refactor(ui): cleanup variables namespace MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ui/web/src/views/ChargingStationsView.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/web/src/views/ChargingStationsView.vue b/ui/web/src/views/ChargingStationsView.vue index 18b0cc02..113137c8 100644 --- a/ui/web/src/views/ChargingStationsView.vue +++ b/ui/web/src/views/ChargingStationsView.vue @@ -44,7 +44,7 @@ 0 " - :key="state.reload" + :key="state.renderChargingStationsList" :charging-stations="app?.appContext.config.globalProperties.$chargingStations" /> @@ -73,8 +73,8 @@ const randomUUID = (): `${string}-${string}-${string}-${string}-${string}` => { } const state = reactive({ + renderChargingStationsList: randomUUID(), loading: false, - reload: randomUUID(), uiServerIndex: getFromLocalStorage('uiServerConfigurationIndex', 0) }) @@ -90,7 +90,7 @@ const uiServerConfigurations: { configuration: UIServerConfigurationSection; ind const $toast = useToast() -const loadChargingStations = (reloadCallback?: () => void): void => { +const loadChargingStations = (renderCallback?: () => void): void => { if (state.loading === false) { state.loading = true uiClient @@ -105,8 +105,8 @@ const loadChargingStations = (reloadCallback?: () => void): void => { console.error('Error at fetching charging stations:', error) }) .finally(() => { - if (reloadCallback != null) { - reloadCallback() + if (renderCallback != null) { + renderCallback() } state.loading = false }) -- 2.34.1