chore(layout): integrate Query provider into root layout

This commit is contained in:
ngc2207 2025-01-31 16:41:04 +08:00
parent f87c0acc13
commit 531288f57a

View File

@ -2,6 +2,7 @@ import "@/app/globals.css";
import { cn } from "@/lib/utils";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { QueryProvider } from "@/components/query-provider";
import { ThemeProvider } from "@/components/theme-provider";
const inter = Inter({ subsets: ["latin"] });
@ -19,14 +20,16 @@ export default function RootLayout({ children }: Readonly<RootLayoutProps>) {
return (
<html lang="en" suppressHydrationWarning>
<body className={cn(inter.className, "antialiased min-h-screen")}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
</ThemeProvider>
<QueryProvider>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
{children}
</ThemeProvider>
</QueryProvider>
</body>
</html>
);