diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index e0b56e6..7c40dff 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -1,13 +1,12 @@ import prisma from '@/lib/prisma'; import ActiveCard from './ActiveCard'; import { getAuthServerSession } from '@/lib/authenticate'; -import { red } from 'next/dist/lib/picocolors'; import { redirect } from 'next/navigation'; export default async function Dashboard() { const authSession = await getAuthServerSession(); console.log(authSession); - if (!authSession || !authSession.user.isTeacher) return redirect('/'); + if (!authSession) return redirect('/'); const tests = await prisma.test.findMany({ select: { isActive: true, isPassed: true, id: true, testOf: { select: { id: true, firstName: true, lastName: true, isTeacher: true } } } });