File size: 518 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import "../styles/globals.css";
import type { AppProps } from "next/app";
import { ConvexProvider, ConvexReactClient } from "convex/react";
const address = process.env.NEXT_PUBLIC_CONVEX_URL;
if (!address) {
throw new Error("Convex deployment url not found in environment.");
}
const convex = new ConvexReactClient(address);
function MyApp({ Component, pageProps }: AppProps) {
return (
<ConvexProvider client={convex}>
<Component {...pageProps} />
</ConvexProvider>
);
}
export default MyApp;
|