Fix all NextAuth v4 imports across codebase
This commit is contained in:
@@ -4,13 +4,14 @@ import NewListButton from '@/components/NewListButton'
|
||||
import GlobalSearch from '@/components/GlobalSearch'
|
||||
import EmptyState from '@/components/EmptyState'
|
||||
import Link from 'next/link'
|
||||
import { auth } from '@/auth'
|
||||
import { getServerSession } from 'next-auth'
|
||||
import { authOptions } from '@/pages/api/auth/[...nextauth]'
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export default async function Home() {
|
||||
const session = await auth()
|
||||
const session = await getServerSession(authOptions)
|
||||
|
||||
if (!session?.user) {
|
||||
redirect('/auth/login')
|
||||
|
||||
Reference in New Issue
Block a user