From 60bc6b3b0d80566017828727c7aaec6ca690e159 Mon Sep 17 00:00:00 2001 From: Frederic Henrichs Date: Mon, 23 Sep 2024 15:45:52 +0200 Subject: [PATCH] Mobile view: FIx chargers beeing clickable when disconnected. fix #93 --- frontend/src/components/charger_list.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/src/components/charger_list.tsx b/frontend/src/components/charger_list.tsx index b008af8..5ea5296 100644 --- a/frontend/src/components/charger_list.tsx +++ b/frontend/src/components/charger_list.tsx @@ -168,6 +168,9 @@ export class ChargerListComponent extends Component<{}, ChargerListComponentStat return <> { + if (!this.connection_possible(charger)) { + return; + } await this.connect_to_charger(charger); }} className="d-flex justify-content-between align-items-center p-2d5">
{charger.name}