Elliott-Chong/chatpdf-yt

Error query

staniscimarco opened this issue · 1 comments

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

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>
  );
}