-function deleteChargingStation(): void {
- uiClient.deleteChargingStation(props.chargingStation.stationInfo.hashId)
+const deleteChargingStation = (): void => {
+ uiClient
+ .deleteChargingStation(props.chargingStation.stationInfo.hashId)
+ .then(() => {
+ $toast.success('Charging station successfully deleted')
+ })
+ .catch((error: Error) => {
+ $toast.error('Error at deleting charging station')
+ console.error('Error at deleting charging station:', error)
+ })