- Add dashboard shell with auth integration - Wire Better Auth / Convex (client, server, HTTP routes) - Add shadcn-style UI primitives and logo assets - Update global styles and landing page - Add internal docs (.docs) Made-with: Cursor
27 lines
620 B
TypeScript
27 lines
620 B
TypeScript
"use client";
|
|
|
|
import { ReactNode } from "react";
|
|
import { ConvexReactClient } from "convex/react";
|
|
import { ConvexBetterAuthProvider } from "@convex-dev/better-auth/react";
|
|
import { authClient } from "@/lib/auth-client";
|
|
|
|
const convex = new ConvexReactClient(process.env.NEXT_PUBLIC_CONVEX_URL!);
|
|
|
|
export function ConvexClientProvider({
|
|
children,
|
|
initialToken,
|
|
}: {
|
|
children: ReactNode;
|
|
initialToken?: string | null;
|
|
}) {
|
|
return (
|
|
<ConvexBetterAuthProvider
|
|
client={convex}
|
|
authClient={authClient}
|
|
initialToken={initialToken}
|
|
>
|
|
{children}
|
|
</ConvexBetterAuthProvider>
|
|
);
|
|
}
|