Fix all NextAuth v4 imports across codebase
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { getListWithItems } from '@/lib/actions'
|
||||
import { getPermission } from '@/lib/permissions'
|
||||
import { auth } from '@/auth'
|
||||
import { getServerSession } from 'next-auth'
|
||||
import { authOptions } from '@/pages/api/auth/[...nextauth]'
|
||||
import { notFound } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
import { ArrowLeft } from 'lucide-react'
|
||||
@@ -10,7 +11,7 @@ import ListDetailView from '@/components/ListDetailView'
|
||||
export const dynamic = 'force-dynamic'
|
||||
|
||||
export default async function ListDetailPage({ params }: { params: { id: string } }) {
|
||||
const session = await auth()
|
||||
const session = await getServerSession(authOptions)
|
||||
if (!session?.user?.id) {
|
||||
notFound()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user