diff --git a/components/nav-mobile.tsx b/components/nav-mobile.tsx index 7c9b7e131306ae66b055f103a5167523f6ff18c2..8a3c1e82abb4d55f01148152a1e190319902aa87 100644 --- a/components/nav-mobile.tsx +++ b/components/nav-mobile.tsx @@ -1,7 +1,6 @@ "use client" import { Icons } from "@/components/icons" -import { cn } from "@/lib/utils" import { SidebarNavItem } from "@/types" import { User } from "next-auth" import Link from "next/link" diff --git a/lib/auth.ts b/lib/auth.ts index bb2d397262d138ced1f46150b7b5819c44b9dad3..bfd6f0e26bec1f13f9c3ee5dd5e29753367cb8eb 100644 --- a/lib/auth.ts +++ b/lib/auth.ts @@ -36,10 +36,12 @@ export const authOptions: NextAuthOptions = { const user = await db.user.findFirst({ where: { - OR: [ - { username: credentials.usernameOrEmail.toLowerCase() }, - { email: credentials.usernameOrEmail.toLowerCase() }, - ], + OR: [{ + username: credentials.usernameOrEmail.toLowerCase() + }, + { + email: credentials.usernameOrEmail.toLowerCase() + }], }, }) @@ -52,9 +54,9 @@ export const authOptions: NextAuthOptions = { user.password ) - if(!user.emailVerified){ + if (!user.emailVerified) { throw new Error('Email is not verified') - } + } if (!isPasswordValid) { throw new Error('invalid password')