37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import type React from "react";
|
|
import { GeistSans } from "geist/font/sans";
|
|
import { GeistMono } from "geist/font/mono";
|
|
import { Analytics } from "@vercel/analytics/next";
|
|
import "./globals.css";
|
|
import { ThemeProvider } from "@/components/theme-provider";
|
|
import { Suspense } from "react";
|
|
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
import { AuthProvider } from "@/contexts/auth-context";
|
|
import { Toaster } from "@/components/ui/sonner";
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
const queryClient = new QueryClient();
|
|
|
|
return (
|
|
<html lang="en">
|
|
<body className={`font-sans ${GeistSans.variable} ${GeistMono.variable}`}>
|
|
<Suspense fallback={<div>Loading...</div>}>
|
|
<QueryClientProvider client={queryClient}>
|
|
<ThemeProvider>
|
|
<Toaster />
|
|
<AuthProvider>{children} </AuthProvider>
|
|
</ThemeProvider>
|
|
</QueryClientProvider>
|
|
</Suspense>
|
|
<Analytics />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|