mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 07:38:33 -06:00
36 lines
954 B
TypeScript
36 lines
954 B
TypeScript
import type { Metadata } from "next";
|
|
import "./globals.css";
|
|
import Providers from "./providers";
|
|
import { Suspense } from "react";
|
|
import { getQueryClient } from "./providersQueryClientUtils";
|
|
import { hydrateCourses } from "@/hooks/hookHydration";
|
|
import { dehydrate, HydrationBoundary } from "@tanstack/react-query";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Canvas Manager 2.0",
|
|
};
|
|
|
|
export default async function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const queryClient = getQueryClient();
|
|
await hydrateCourses(queryClient);
|
|
const dehydratedState = dehydrate(queryClient);
|
|
|
|
return (
|
|
<html lang="en">
|
|
<body className="bg-slate-900 h-screen p-1 text-slate-300">
|
|
<Suspense>
|
|
<Providers>
|
|
<HydrationBoundary state={dehydratedState}>
|
|
{children}
|
|
</HydrationBoundary>
|
|
</Providers>
|
|
</Suspense>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|