mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
19 lines
466 B
TypeScript
19 lines
466 B
TypeScript
"use client";
|
|
|
|
import { stackClientApp } from "@/stack/client";
|
|
import { ConvexProvider, ConvexReactClient } from "convex/react";
|
|
import { ReactNode } from "react";
|
|
|
|
const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);
|
|
convex.setAuth(
|
|
stackClientApp.getConvexClientAuth({})
|
|
);
|
|
|
|
export default function ConvexClientProvider({
|
|
children,
|
|
}: {
|
|
children: ReactNode;
|
|
}) {
|
|
return <ConvexProvider client={convex}>{children}</ConvexProvider>;
|
|
}
|