fix
This commit is contained in:
		
							parent
							
								
									9962a415be
								
							
						
					
					
						commit
						48143a2d9a
					
				@ -44,16 +44,14 @@ 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({
 | 
				
			||||||
  }
 | 
					      where: eq(usersTable.id, userId),
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const user = await db.query.usersTable.findFirst({
 | 
					    if (!user) {
 | 
				
			||||||
    where: eq(usersTable.id, userId),
 | 
					      await setInitialUserData(userId);
 | 
				
			||||||
  });
 | 
					    }
 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (!user) {
 | 
					 | 
				
			||||||
    await setInitialUserData(userId);
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user