1
0
mirror of https://github.com/Fayorg/calendrier-avant.git synced 2026-05-27 17:18:38 +02:00

fix: removed unused database fields & fix prisma errors

This commit is contained in:
2023-12-20 10:20:21 +01:00
parent da3a9df402
commit b47b59f4cd
5 changed files with 12 additions and 23 deletions

View File

@@ -8,10 +8,9 @@ export default async function Dashboard() {
console.log(authSession);
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 } } } });
const tests = await prisma.test.findMany({ select: { isActive: true, id: true, testOf: { select: { id: true, firstName: true, lastName: true, isTeacher: true } } } });
const activeTests = tests.filter((test) => test.isActive);
const passedTests = tests.filter((test) => test.isPassed);
return (
<div>

View File

@@ -24,12 +24,11 @@ export default function Page({ params }: { params: { id: string } }) {
useEffect(() => {
featchResults(testId);
setTimeout(() => {
featchResults(testId);
}, 5000);
}, [testId]);
setTimeout(() => {
featchResults(testId);
}, 5000);
return (
<div className={'p-4 md:p-12 w-full h-screen bg-black flex flex-col justify-between gap-y-4'}>
<Image src={logo} alt={'Logo'} width={100} height={200} className={'mx-auto w-full md:w-[400px]'} />