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" && ( +
+ +
+ )}