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