Fix all NextAuth v4 imports across codebase
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { auth } from '@/auth'
|
||||
import { getServerSession } from 'next-auth'
|
||||
import { authOptions } from '@/pages/api/auth/[...nextauth]'
|
||||
import { redirect } from 'next/navigation'
|
||||
import { getInvitations } from '@/lib/sharing-actions'
|
||||
import InvitationCard from '@/components/InvitationCard'
|
||||
@@ -27,7 +28,7 @@ type Invitation = {
|
||||
}
|
||||
|
||||
export default async function InvitationsPage() {
|
||||
const session = await auth()
|
||||
const session = await getServerSession(authOptions)
|
||||
|
||||
if (!session?.user) {
|
||||
redirect('/auth/login')
|
||||
|
||||
Reference in New Issue
Block a user