- Added API routes for fetching connected users, keywords, missions, and stations. - Created a new QueryProvider component for managing query states and socket events. - Introduced connection stores for dispatch and pilot, managing socket connections and states. - Updated Prisma schema for connected aircraft model. - Enhanced UI with toast notifications for status updates and chat interactions. - Implemented query functions for fetching connected users and keywords with error handling.
38 lines
977 B
TypeScript
38 lines
977 B
TypeScript
"use client";
|
|
|
|
import { Pannel } from "dispatch/_components/pannel/Pannel";
|
|
import { usePannelStore } from "_store/pannelStore";
|
|
import { cn } from "helpers/cn";
|
|
import dynamic from "next/dynamic";
|
|
import { Chat } from "../_components/left/Chat";
|
|
import { Report } from "../_components/left/Report";
|
|
|
|
const DispatchPage = () => {
|
|
const { isOpen } = usePannelStore();
|
|
return (
|
|
<div className="relative flex-1 flex transition-all duration-500 ease w-full">
|
|
{/* <MapToastCard2 /> */}
|
|
<div className="flex flex-1 relative">
|
|
<div className="absolute left-0 top-1/2 transform -translate-y-1/2 pl-4 z-999999">
|
|
<Chat />
|
|
<div className="mt-2">
|
|
<Report />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div
|
|
className={cn(
|
|
"absolute right-0 w-[500px] z-999 transition-transform",
|
|
isOpen ? "translate-x-0" : "translate-x-full",
|
|
)}
|
|
>
|
|
<Pannel />
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
DispatchPage.displayName = "DispatchPage";
|
|
|
|
export default DispatchPage;
|