fix: root directory creation

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-10-05 22:14:44 +00:00
parent 1fcdaf4f86
commit f7bc5fd958
14 changed files with 95 additions and 107 deletions

View File

@@ -11,7 +11,7 @@ import {
useConvexAuth,
} from "convex/react"
import { useEffect, useState } from "react"
import { authClient } from "@/auth-client"
import { authClient, SessionContext } from "@/auth"
import { LoadingSpinner } from "@/components/ui/loading-spinner"
export const Route = createFileRoute("/_authenticated")({
@@ -21,7 +21,7 @@ export const Route = createFileRoute("/_authenticated")({
function AuthenticatedLayout() {
const { search } = useLocation()
const { isLoading } = useConvexAuth()
const { isPending: sessionLoading } = authClient.useSession()
const { data: session, isPending: sessionLoading } = authClient.useSession()
const [hasProcessedAuth, setHasProcessedAuth] = useState(false)
// Check if we're in the middle of processing an auth code
@@ -50,6 +50,11 @@ function AuthenticatedLayout() {
return (
<>
<Authenticated>
{session ? (
<SessionContext value={session}>
<Outlet />
</SessionContext>
) : null}
<Outlet />
</Authenticated>
<Unauthenticated>