Elliott-Chong / chatpdf-yt

https://chatpdf-elliott.vercel.app
641 stars 263 forks source link

Error query #52

Open staniscimarco opened 2 weeks ago

staniscimarco commented 2 weeks ago

When I run the application asked me directly the access with clerk and after I receive this error IMG_6873

mayank2130 commented 6 hours ago

Create a providers.tsx in components and wrap the children in layout file

Providers.tsx

"use client";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ReactNode } from "react";

const client = new QueryClient();

const Providers = ({children}: {children: ReactNode}) => {
  return <QueryClientProvider client={client}>
    {children}
  </QueryClientProvider>;
};

export default Providers

layout.tsx

import Providers from "@/components/Providers";

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body className={inter.className}>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}