Skip to content

Commit

Permalink
fix(deps): update dependency @clerk/nextjs to v6 (#143)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Aamir Azad <[email protected]>
  • Loading branch information
renovate[bot] and aamirazad authored Oct 26, 2024
1 parent 9354c71 commit c3bc1f7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 5 deletions.
Binary file modified bun.lockb
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/app/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export async function setUserProperty<K extends keyof UsersTableType>(
propertyName: K,
value: UsersTableType[K],
) {
const { userId } = auth();
const { userId } = await auth();

if (!userId) {
return null;
Expand All @@ -37,7 +37,7 @@ export async function setUserProperty<K extends keyof UsersTableType>(
}

export async function getUserData() {
const { userId } = auth();
const { userId } = await auth();

if (!userId) return null;

Expand Down
2 changes: 1 addition & 1 deletion src/app/api/getUserData/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down
11 changes: 10 additions & 1 deletion src/app/sign-in/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand All @@ -27,3 +28,11 @@ export default function SignIn() {
</main>
);
}

export default function SignIn() {
return (
<Suspense fallback={<LoadingSpinner>Loading...</LoadingSpinner>}>
<SignInContent />
</Suspense>
);
}

0 comments on commit c3bc1f7

Please sign in to comment.