fixed dehydrate
This commit is contained in:
@@ -7,7 +7,7 @@ import "./globals.css"
|
||||
import Header from "@/components/layout/Header"
|
||||
import MobileBottomNav from "@/components/layout/MobileBar"
|
||||
import { Toaster } from "@/components/ui/sonner"
|
||||
import { Providers } from "@/context/provider"
|
||||
import { Providers } from "@/context/Provider"
|
||||
import AuthWrapper from "@/context/AuthWrapper"
|
||||
|
||||
const geistSans = Geist({
|
||||
|
||||
@@ -1,20 +1,22 @@
|
||||
"use client"
|
||||
"use client";
|
||||
|
||||
import { QueryClientProvider, HydrationBoundary } from "@tanstack/react-query"
|
||||
import { queryClient } from "@/lib/queryClient"
|
||||
import type { ReactNode } from "react"
|
||||
import {
|
||||
QueryClientProvider,
|
||||
HydrationBoundary,
|
||||
type DehydratedState,
|
||||
} from "@tanstack/react-query";
|
||||
import { queryClient } from "@/lib/queryClient";
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
interface ProvidersProps {
|
||||
children: ReactNode
|
||||
dehydratedState?: unknown
|
||||
children: ReactNode;
|
||||
dehydratedState?: DehydratedState;
|
||||
}
|
||||
|
||||
export function Providers({ children, dehydratedState }: ProvidersProps) {
|
||||
return (
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<HydrationBoundary state={dehydratedState}>
|
||||
{children}
|
||||
</HydrationBoundary>
|
||||
<HydrationBoundary state={dehydratedState}>{children}</HydrationBoundary>
|
||||
</QueryClientProvider>
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user