mirror of
https://github.com/Fayorg/calendrier-avant.git
synced 2026-05-28 01:28:37 +02:00
added michal's styles to the results page
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
"use server";
|
||||
import {Chart} from "@components/custom/chart";
|
||||
|
||||
import logo from "@images/logo.svg";
|
||||
import Image from "next/image";
|
||||
import Prisma from '@lib/prisma'
|
||||
|
||||
interface data {
|
||||
@@ -9,12 +10,8 @@ interface data {
|
||||
}
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const grades = await Prisma.grade.findMany({
|
||||
where: {
|
||||
testId: parseInt(params.id)
|
||||
}
|
||||
})
|
||||
|
||||
const grades = await Prisma.grade.findMany({ where: { testId: parseInt(params.id) }})
|
||||
const allGrades = ['1', '1.5', '2', '2.5', '3', '3.5', '4', '4.5', '5', '5.5', '6']
|
||||
let gradeOccurences = new Array(allGrades.length).fill(0)
|
||||
const gradeList = grades.map((grade) => grade.grade)
|
||||
@@ -35,7 +32,11 @@ export default async function Page({ params }: { params: { id: string } }) {
|
||||
console.log(grade);
|
||||
}
|
||||
|
||||
return <div>
|
||||
<Chart data={data}/>
|
||||
</div>
|
||||
return (
|
||||
<div className={"p-4 md:p-12 w-full h-screen bg-black"}>
|
||||
<Image src={logo} alt={"Logo"} width={100} height={200} className={"mx-auto w-full md:w-[400px]"}/>
|
||||
<Chart data={data}/>
|
||||
</div>
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user