This commit is contained in:
BennyKok 2024-01-17 16:47:45 +08:00
parent 9962a415be
commit 48143a2d9a

View File

@ -44,10 +44,7 @@ function FeatureCard(props: {
export default async function Main() { export default async function Main() {
const { userId } = await auth(); const { userId } = await auth();
if (!userId) { if (userId) {
return <div>No auth</div>;
}
const user = await db.query.usersTable.findFirst({ const user = await db.query.usersTable.findFirst({
where: eq(usersTable.id, userId), where: eq(usersTable.id, userId),
}); });
@ -55,6 +52,7 @@ export default async function Main() {
if (!user) { if (!user) {
await setInitialUserData(userId); await setInitialUserData(userId);
} }
}
return ( return (
<div className="flex flex-col w-full"> <div className="flex flex-col w-full">