mirror of
https://github.com/Fayorg/calendrier-avant.git
synced 2026-05-28 01:28:37 +02:00
work in progress : view results
This commit is contained in:
21
app/results/[id]/page.tsx
Normal file
21
app/results/[id]/page.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
"use server";
|
||||
import {Chart} from "@components/custom/chart";
|
||||
|
||||
import Prisma from '@lib/prisma'
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const grades = await Prisma.grade.findMany({
|
||||
where: {
|
||||
testId: parseInt(params.id)
|
||||
}
|
||||
})
|
||||
|
||||
for (let grade in grades) {
|
||||
console.log(grade);
|
||||
}
|
||||
|
||||
return <div>
|
||||
My Post: {params.id}
|
||||
<Chart />
|
||||
</div>
|
||||
}
|
||||
Reference in New Issue
Block a user