- 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.
59 lines
1.5 KiB
TypeScript
59 lines
1.5 KiB
TypeScript
import type { Metadata } from "next";
|
|
import localFont from "next/font/local";
|
|
import "./globals.css";
|
|
import { NextAuthSessionProvider } from "./_components/AuthSessionProvider";
|
|
import { getServerSession } from "./api/auth/[...nextauth]/auth";
|
|
import { Toaster } from "react-hot-toast";
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
import { QueryProvider } from "_components/QueryProvider";
|
|
|
|
const geistSans = localFont({
|
|
src: "./fonts/GeistVF.woff",
|
|
variable: "--font-geist-sans",
|
|
});
|
|
const geistMono = localFont({
|
|
src: "./fonts/GeistMonoVF.woff",
|
|
variable: "--font-geist-mono",
|
|
});
|
|
|
|
export const metadata: Metadata = {
|
|
title: "VAR Leitstelle v2",
|
|
description: "Die neue VAR Leitstelle.",
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const session = await getServerSession();
|
|
return (
|
|
<html lang="de" data-theme="dark">
|
|
<body
|
|
className={`${geistSans.variable} ${geistMono.variable} h-screen flex flex-col overflow-hidden`}
|
|
>
|
|
<Toaster
|
|
containerStyle={{
|
|
top: 150,
|
|
left: 20,
|
|
right: 20,
|
|
}}
|
|
toastOptions={{
|
|
style: {
|
|
background: "var(--color-base-100)",
|
|
color: "var(--color-base-content)",
|
|
},
|
|
}}
|
|
position="top-left"
|
|
reverseOrder={false}
|
|
/>
|
|
<QueryProvider>
|
|
<NextAuthSessionProvider session={session}>
|
|
{children}
|
|
</NextAuthSessionProvider>
|
|
</QueryProvider>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|