Redesigned the Record page along with solving some bugs on the FillBlanks

This commit is contained in:
Tiago Ribeiro
2023-06-23 14:14:12 +01:00
parent 447cecbf3f
commit d3a37eed3e
11 changed files with 311 additions and 178 deletions

View File

@@ -150,7 +150,7 @@ export default function Finish({user, scores, modules, isLoading, onViewResults}
<div className="flex gap-2">
<div className="w-3 h-3 bg-mti-green-light rounded-full mt-1" />
<div className="flex flex-col">
<span className="text-mti-green-light">{selectedScore.total.toString().padStart(2, "0")}</span>
<span className="text-mti-green-light">{selectedScore.correct.toString().padStart(2, "0")}</span>
<span className="text-lg">Correct</span>
</div>
</div>

View File

@@ -9,6 +9,7 @@ import {totalExamsByModule} from "@/utils/stats";
import useStats from "@/hooks/useStats";
import Button from "@/components/Low/Button";
import {calculateAverageLevel} from "@/utils/score";
import {sortByModuleName} from "@/utils/moduleUtils";
interface Props {
user: User;
@@ -164,7 +165,7 @@ export default function Selection({user, onStart}: Props) {
</div>
</section>
<Button
onClick={() => onStart(selectedModules)}
onClick={() => onStart(selectedModules.sort(sortByModuleName))}
color="green"
className="px-12 w-full max-w-xs self-end"
disabled={selectedModules.length === 0}>