generated from muhtadeetaron/nextjs-template
fix(exam): fix startexam function (not finding examdata)
This commit is contained in:
@ -130,17 +130,19 @@ const page = () => {
|
||||
className="flex bg-[#113768] rounded-[8] py-2 px-4 justify-between items-center"
|
||||
>
|
||||
<div className=" flex gap-3 items-center">
|
||||
<h2 className="font-medium text-lg text-white">
|
||||
<h2 className="font-medium text-sm text-white">
|
||||
{user.rank}
|
||||
</h2>
|
||||
<Avatar className="bg-slate-300 w-6 h-6">
|
||||
<AvatarFallback className="text-md font-semibold">
|
||||
<AvatarFallback className="text-sm font-semibold">
|
||||
{user.name.charAt(0).toUpperCase()}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
<h3 className="font-medium text-sm text-white">You</h3>
|
||||
</div>
|
||||
<p className="font-medium text-white/70">{user.points}pt</p>
|
||||
<p className="font-medium text-white/70 text-sm">
|
||||
{user.points}pt
|
||||
</p>
|
||||
</div>
|
||||
))}
|
||||
</section>
|
||||
@ -154,9 +156,9 @@ const page = () => {
|
||||
className="flex border-2 border-[#c5dbf8] rounded-[8] py-2 px-4 justify-between items-center"
|
||||
>
|
||||
<div className="flex gap-3 items-center">
|
||||
<h2 className="font-medium text-lg">{idx + 1}</h2>
|
||||
<h2 className="font-medium text-sm">{idx + 1}</h2>
|
||||
<Avatar className="bg-slate-300 w-6 h-6">
|
||||
<AvatarFallback className="text-md font-semibold">
|
||||
<AvatarFallback className="text-sm font-semibold">
|
||||
{user.name.charAt(0).toUpperCase()}
|
||||
</AvatarFallback>
|
||||
</Avatar>
|
||||
@ -164,7 +166,7 @@ const page = () => {
|
||||
{user.name.split(" ").slice(0, 2).join(" ")}
|
||||
</h3>
|
||||
</div>
|
||||
<p className="font-medium text-[#000]/40">
|
||||
<p className="font-medium text-[#000]/40 text-sm">
|
||||
{user.points}pt
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@ -82,10 +82,9 @@ export default function PretestPage() {
|
||||
|
||||
function handleStartExam() {
|
||||
setCurrentExam(examData);
|
||||
startExam();
|
||||
startExam(examData); // Pass examData directly
|
||||
router.push(`/exam/${id}?time=${metadata?.metadata.duration}`);
|
||||
}
|
||||
|
||||
return (
|
||||
<BackgroundWrapper>
|
||||
<div className="min-h-screen flex flex-col justify-between">
|
||||
|
||||
Reference in New Issue
Block a user