ENCOA-180: Prevented users from checking their results if not released yet
This commit is contained in:
@@ -277,7 +277,11 @@ const StatsGridItem: React.FC<StatsGridItemProps> = ({
|
||||
selectedTrainingExams.some((exam) => exam.includes(timestamp)) &&
|
||||
"border-2 border-slate-600",
|
||||
)}
|
||||
onClick={examNumber === undefined ? selectExam : undefined}
|
||||
onClick={() => {
|
||||
if (!!assignment && !assignment.released) return;
|
||||
if (examNumber === undefined) return selectExam();
|
||||
return;
|
||||
}}
|
||||
style={{
|
||||
...(width !== undefined && {width}),
|
||||
...(height !== undefined && {height}),
|
||||
|
||||
@@ -212,7 +212,7 @@ export default function Finish({user, scores, modules, information, solutions, i
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{assignment && !assignment.released && (
|
||||
{assignment && !assignment.released && !isLoading && (
|
||||
<div className="absolute left-1/2 top-1/2 flex h-fit w-fit -translate-x-1/2 -translate-y-1/2 flex-col items-center gap-12">
|
||||
{/* <span className={clsx("loading loading-infinity w-32", moduleColors[selectedModule].progress)} /> */}
|
||||
<BsBan size={64} className={clsx(moduleColors[selectedModule].progress)} />
|
||||
@@ -223,7 +223,7 @@ export default function Finish({user, scores, modules, information, solutions, i
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
{!isLoading && (
|
||||
{!isLoading && !(assignment && !assignment.released) && (
|
||||
<div className="mb-20 mt-32 flex w-full items-center justify-between gap-9">
|
||||
<span className="max-w-3xl">{moduleResultText(selectedModule, bandScore)}</span>
|
||||
<div className="flex gap-9 px-16">
|
||||
|
||||
Reference in New Issue
Block a user