From c884fedb62ba6e2d4a5bbd47d8aa02640b4de2b6 Mon Sep 17 00:00:00 2001 From: nocnico Date: Mon, 2 Jun 2025 22:21:54 +0200 Subject: [PATCH] minor fixes Pilot navbar --- .../navbar/_components/Connection.tsx | 60 +++++++++++-------- 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/apps/dispatch/app/pilot/_components/navbar/_components/Connection.tsx b/apps/dispatch/app/pilot/_components/navbar/_components/Connection.tsx index 4c02114e..6a876dd3 100644 --- a/apps/dispatch/app/pilot/_components/navbar/_components/Connection.tsx +++ b/apps/dispatch/app/pilot/_components/navbar/_components/Connection.tsx @@ -4,6 +4,7 @@ import { usePilotConnectionStore } from "_store/pilot/connectionStore"; import { useEffect, useRef, useState } from "react"; import { useQuery } from "@tanstack/react-query"; import { getStationsAPI } from "_querys/stations"; +import toast from "react-hot-toast"; export const ConnectionBtn = () => { const modalRef = useRef(null); @@ -15,6 +16,7 @@ export const ConnectionBtn = () => { logoffTime: null, selectedStationId: null, }); + const [logoffDebounce, setLogoffDebounce] = useState(null); const { data: stations } = useQuery({ queryKey: ["stations"], @@ -73,37 +75,45 @@ export const ConnectionBtn = () => { ) : (

Als Pilot anmelden

)} -
- -
+ {connection.status !== "connected" && ( +
+ +
+ )}