Loading test catalog...
;
+ }
+
+ if (unattemptedExams.length === 0) {
+ return (
+
+ {filteredExams.length > 0 ? (
+ <>
+
All available exams in this section have been attempted!
+
Review your scores, solution explanations, and performance in the Past Attempts section below.
+ >
+ ) : (
+
No active exams found for {selectedPattern === "NEET" ? "NEET" : "JEE"}. Try adjusting your filters!
+ )}
+
+ );
+ }
+
+ return (
+
+
+ {(showAllExams ? unattemptedExams : unattemptedExams.slice(0, 3)).map((exam) => {
+ const isLocked = !hasAccessTo("weekly-test-series");
+
+ // Date logic
+ const now = new Date();
+ const scheduledTime = exam.scheduled_date ? new Date(exam.scheduled_date) : now;
+ const endTime = exam.end_date ? new Date(exam.end_date) : null;
+ const isUpcoming = scheduledTime > now;
+ const isExpired = endTime ? now > endTime : false;
+
+ return (
+
+
+
+
+
+ {exam.type} Test
- )}
+ {exam.exam_pattern && (
+
+ {exam.exam_pattern === 'JEE_Main' ? 'JEE Main' : exam.exam_pattern === 'JEE_Advanced' ? 'JEE Advanced' : exam.exam_pattern}
+
+ )}
+
+ {isUpcoming ? (
+
+ Upcoming
+
+ ) : isLocked ? (
+
+ Premium
+
+ ) : isExpired ? (
+
+ Expired
+
+ ) : null}
+
+ {exam.title}
+
+
+
+ {isUpcoming ? `Available on ${formatDate(exam.scheduled_date!)}` : isExpired ? `Expired on ${formatDate(exam.end_date!)}` : 'Available Now'}
+
+
{exam.total_time} Min • {exam.difficulty} Difficulty
+
+
{isUpcoming ? (
-
- Upcoming
-
+
) : isLocked ? (
-
- Premium
-
+
) : isExpired ? (
-
+
- ) : isAttempted ? (
-
- Attempted
-
- ) : null}
-
-
- {exam.title}
-
-
-
- {isUpcoming ? `Available on ${formatDate(exam.scheduled_date!)}` : isExpired ? `Expired on ${formatDate(exam.end_date!)}` : 'Available Now'}
-
-
{exam.total_time} Min • {exam.difficulty} Difficulty
-
-
- {isUpcoming ? (
-
- ) : isLocked ? (
-
- ) : isExpired && !isAttempted ? (
-
- ) : isAttempted ? (
-
-
-
+ ) : (
+
+
- {!isExpired && (
-
-
-
- )}
-
- ) : (
-
-
-
- )}
-
-
- )})}
-
-
- {filteredExams.length > 3 && !showAllExams && (
-
-
- Earlier Exams
-
-
- {filteredExams.slice(3).map((exam) => {
- const attempt = attemptsByTest[exam.id];
- const isAttempted = !!attempt;
- const isLocked = !hasAccessTo("weekly-test-series");
-
- // Date logic
- const now = new Date();
- const scheduledTime = exam.scheduled_date ? new Date(exam.scheduled_date) : now;
- const endTime = exam.end_date ? new Date(exam.end_date) : null;
- const isUpcoming = scheduledTime > now;
- const isExpired = endTime ? now > endTime : false;
-
- return (
-
-
-
-
-
- {exam.type} Test
-
- {exam.exam_pattern && (
-
- {exam.exam_pattern === 'JEE_Main' ? 'JEE Main' : exam.exam_pattern === 'JEE_Advanced' ? 'JEE Advanced' : exam.exam_pattern}
-
- )}
-
- {isUpcoming ? (
-
- Upcoming
-
- ) : isLocked ? (
-
- Premium
-
- ) : isExpired ? (
-
- Expired
-
- ) : isAttempted ? (
-
- Attempted
-
- ) : null}
-
-
- {exam.title}
-
-
-
- {isUpcoming ? `Available on ${formatDate(exam.scheduled_date!)}` : isExpired ? `Expired on ${formatDate(exam.end_date!)}` : 'Available Now'}
-
-
{exam.total_time} Min • {exam.difficulty} Difficulty
-
-
- {isUpcoming ? (
-
- ) : isLocked ? (
-
- ) : isExpired && !isAttempted ? (
-
- ) : isAttempted ? (
-
-
-
-
- {!isExpired && (
-
-
-
- )}
-
- ) : (
-
-
-
- )}
-
-
- )})}
+ {unattemptedExams.length > 3 && !showAllExams && (
+
+
-
- )}
-
- )}
+ )}
+