db sync userid with clerk

This commit is contained in:
2024-06-18 19:47:13 -04:00
parent 15d2b4113d
commit 0b89e8ec18
6 changed files with 54 additions and 383 deletions
+8 -1
View File
@@ -1,7 +1,14 @@
import { syncUsers } from "@/db/db";
import { SignInButton, SignedOut } from "@clerk/nextjs";
import { auth, currentUser } from "@clerk/nextjs/server";
import React from "react";
const page = () => {
const page = async () => {
const user = await currentUser();
if (user) {
syncUsers(user);
}
return (
<div>
<SignedOut>