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