Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @clerk/nextjs to v6 #143

Merged
merged 3 commits into from
Oct 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
);
}
Loading