fixed dispatch eslint errors

This commit is contained in:
PxlLoewe
2025-07-10 00:35:34 -07:00
parent eec72a51b8
commit a9a4f1617a
47 changed files with 396 additions and 185 deletions

View File

@@ -1,4 +1,4 @@
import { ConnectedAircraft, Prisma } from "@repo/db";
import { Prisma } from "@repo/db";
import { usePilotConnectionStore } from "_store/pilot/connectionStore";
import { useMrtStore } from "_store/pilot/MrtStore";
import { pilotSocket } from "(app)/pilot/socket";
@@ -21,7 +21,7 @@ export const useButtons = () => {
}) => editConnectedAircraftAPI(aircraftId, data),
});
const { page, setPage } = useMrtStore((state) => state);
const { setPage } = useMrtStore((state) => state);
const handleButton =
(button: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "0" | "home") => () => {

View File

@@ -9,7 +9,6 @@ import { editConnectedAircraftAPI, getConnectedAircraftsAPI } from "_querys/airc
import { Prisma } from "@repo/db";
import { getNextDateWithTime } from "@repo/shared-components";
import { Select } from "_components/Select";
import { components } from "react-select";
import { Radio } from "lucide-react";
export const ConnectionBtn = () => {
@@ -54,7 +53,7 @@ export const ConnectionBtn = () => {
return () => {
connection.disconnect();
};
}, [connection.disconnect]);
}, [connection, connection.disconnect]);
const [logoffHours, logoffMinutes] = form.logoffTime?.split(":").map(Number) || [];
@@ -87,7 +86,7 @@ export const ConnectionBtn = () => {
return () => {
if (logoffDebounce) clearTimeout(logoffDebounce);
};
}, [logoffHours, logoffMinutes, connection.connectedAircraft]);
}, [logoffHours, logoffMinutes, connection.connectedAircraft, aircraftMutation, logoffDebounce]);
const session = useSession();
const uid = session.data?.user?.id;
@@ -143,7 +142,9 @@ export const ConnectionBtn = () => {
})
}
value={form.selectedStationId ?? ""}
formatOptionLabel={(option: any) => option.component}
formatOptionLabel={(option: unknown) =>
(option as { component: React.ReactNode }).component
}
options={
stations?.map((station) => ({
value: station.id.toString(),