diff --git a/bun.lockb b/bun.lockb index dd3d04a..424bc5c 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 5dee27f..950e408 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "start": "next start" }, "dependencies": { - "@clerk/nextjs": "^5.1.5", + "@clerk/nextjs": "^6.0.0", "@clerk/themes": "^2.1.9", "@hookform/resolvers": "^3.6.0", "@radix-ui/react-alert-dialog": "^1.1.1", diff --git a/src/app/actions.ts b/src/app/actions.ts index da16463..13447ca 100644 --- a/src/app/actions.ts +++ b/src/app/actions.ts @@ -17,7 +17,7 @@ export async function setUserProperty( propertyName: K, value: UsersTableType[K], ) { - const { userId } = auth(); + const { userId } = await auth(); if (!userId) { return null; @@ -37,7 +37,7 @@ export async function setUserProperty( } export async function getUserData() { - const { userId } = auth(); + const { userId } = await auth(); if (!userId) return null; diff --git a/src/app/api/getUserData/route.ts b/src/app/api/getUserData/route.ts index 10e9550..95855d9 100644 --- a/src/app/api/getUserData/route.ts +++ b/src/app/api/getUserData/route.ts @@ -2,7 +2,7 @@ import { db } from "@/server/db"; import { auth } from "@clerk/nextjs/server"; export async function GET() { - const { userId } = auth(); + const { userId } = await auth(); if (!userId) return new Response(`Unauthorized`, { status: 401 }); diff --git a/src/app/sign-in/page.tsx b/src/app/sign-in/page.tsx index 2e97555..6acca3e 100644 --- a/src/app/sign-in/page.tsx +++ b/src/app/sign-in/page.tsx @@ -4,8 +4,9 @@ import OpenInternalLink from "@/components/internal-link"; import LoadingSpinner from "@/components/loading-spinner"; import { RedirectToSignIn, SignedIn, SignedOut } from "@clerk/nextjs"; import { useSearchParams } from "next/navigation"; +import { Suspense } from "react"; -export default function SignIn() { +function SignInContent() { const searchParams = useSearchParams(); const redirect = searchParams.get("redirect"); @@ -27,3 +28,11 @@ export default function SignIn() { ); } + +export default function SignIn() { + return ( + Loading...}> + + + ); +}