This commit is contained in:
2025-10-31 16:06:03 -04:00
commit ff334a7f0d
42 changed files with 15172 additions and 0 deletions

35
src/app/layout.tsx Normal file
View File

@@ -0,0 +1,35 @@
"use client";
import { Provider } from "@/components/ui/provider";
import { UrqlProvider, ssrExchange, cacheExchange, fetchExchange, createClient } from '@urql/next';
import { useMemo } from "react";
export default function RootLayout({
children
}: Readonly<{
children: React.ReactNode;
}>) {
const [client, ssr] = useMemo(() => {
const ssr = ssrExchange({
isClient: typeof window !== 'undefined',
});
const client = createClient({
url: process.env.NEXT_PUBLIC_GRAPHQL_URL || "",
exchanges: [cacheExchange, ssr, fetchExchange],
suspense: true,
});
return [client, ssr];
}, []);
return (
<html lang="en" suppressHydrationWarning>
<body>
<UrqlProvider client={client} ssr={ssr}>
<Provider>{children}</Provider>
</UrqlProvider>
</body>
</html>
);
}