File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import type { Metadata } from 'next';
22import { Geist , Geist_Mono } from 'next/font/google' ;
33import './globals.css' ;
44import { ConvexClientProvider } from '@/components/ConvexClientProvider' ;
5- import { withAuth } from '@workos-inc/authkit-nextjs' ;
65
76const geistSans = Geist ( {
87 variable : '--font-geist-sans' ,
@@ -22,16 +21,15 @@ export const metadata: Metadata = {
2221 } ,
2322} ;
2423
25- export default async function RootLayout ( {
24+ export default function RootLayout ( {
2625 children,
2726} : Readonly < {
2827 children : React . ReactNode ;
2928} > ) {
30- const expectAuth = ! ! ( await withAuth ( ) ) . user
3129 return (
3230 < html lang = "en" >
3331 < body className = { `${ geistSans . variable } ${ geistMono . variable } antialiased` } >
34- < ConvexClientProvider expectAuth = { expectAuth } > { children } </ ConvexClientProvider >
32+ < ConvexClientProvider > { children } </ ConvexClientProvider >
3533 </ body >
3634 </ html >
3735 ) ;
Original file line number Diff line number Diff line change @@ -5,9 +5,9 @@ import { ConvexReactClient } from 'convex/react';
55import { ConvexProviderWithAuth } from 'convex/react' ;
66import { AuthKitProvider , useAuth , useAccessToken } from '@workos-inc/authkit-nextjs/components' ;
77
8- export function ConvexClientProvider ( { children, expectAuth } : { children : ReactNode ; expectAuth : boolean } ) {
8+ export function ConvexClientProvider ( { children } : { children : ReactNode } ) {
99 const [ convex ] = useState ( ( ) => {
10- return new ConvexReactClient ( process . env . NEXT_PUBLIC_CONVEX_URL ! , { expectAuth } ) ;
10+ return new ConvexReactClient ( process . env . NEXT_PUBLIC_CONVEX_URL ! ) ;
1111 } ) ;
1212 return (
1313 < AuthKitProvider >
You can’t perform that action at this time.
0 commit comments