pollo/app/(client)/layout.tsx

24 lines
537 B
TypeScript
Raw Permalink Normal View History

2023-09-24 23:49:24 -06:00
"use client";
import { AblyProvider } from "ably/react";
import * as Ably from "ably";
2023-10-11 00:58:00 -06:00
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient();
2023-09-24 23:49:24 -06:00
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
const client = new Ably.Realtime.Promise({
authUrl: "/api/internal/ably",
});
2023-10-11 00:58:00 -06:00
return (
<QueryClientProvider client={queryClient}>
<AblyProvider client={client}>{children}</AblyProvider>{" "}
</QueryClientProvider>
);
2023-09-24 23:49:24 -06:00
}