Fix OG image, CBT filters, syllabus split, and trial duration
This commit is contained in:
@@ -81,20 +81,7 @@ const DEMO_SUBJECTS: Subject[] = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Mathematics / Biology",
|
||||
completionPct: 22,
|
||||
chapters: [
|
||||
{
|
||||
name: "Calculus",
|
||||
isExpanded: false,
|
||||
topics: [
|
||||
{ name: "Limits", status: "In Progress", accuracy: 60, questionsAttempted: 45 },
|
||||
{ name: "Derivatives", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
// Math/Bio dynamic subjects handled below
|
||||
]
|
||||
|
||||
const ZERO_SUBJECTS: Subject[] = [
|
||||
@@ -143,20 +130,7 @@ const ZERO_SUBJECTS: Subject[] = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Mathematics / Biology",
|
||||
completionPct: 0,
|
||||
chapters: [
|
||||
{
|
||||
name: "Core Foundation",
|
||||
isExpanded: false,
|
||||
topics: [
|
||||
{ name: "Limits / Cell Structure", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Derivatives / Genetics", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
// Math/Bio dynamic subjects handled below
|
||||
]
|
||||
|
||||
export default function ProgressTrackerPage() {
|
||||
@@ -166,19 +140,72 @@ export default function ProgressTrackerPage() {
|
||||
|
||||
useEffect(() => {
|
||||
const targetExam = user?.target_exam || "JEE_Main";
|
||||
const mathOrBio = targetExam === "NEET" ? "Biology" : "Mathematics";
|
||||
const isNeet = targetExam === "NEET";
|
||||
|
||||
const getSubjects = (demo: boolean) => {
|
||||
const base = demo ? DEMO_SUBJECTS : ZERO_SUBJECTS;
|
||||
return base.map(s => {
|
||||
if (s.name === "Mathematics / Biology") {
|
||||
return { ...s, name: mathOrBio };
|
||||
const mathDemoSubject: Subject = {
|
||||
name: "Mathematics",
|
||||
completionPct: 22,
|
||||
chapters: [
|
||||
{
|
||||
name: "Calculus",
|
||||
isExpanded: true,
|
||||
topics: [
|
||||
{ name: "Limits", status: "In Progress", accuracy: 60, questionsAttempted: 45 },
|
||||
{ name: "Derivatives", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
return s;
|
||||
});
|
||||
]
|
||||
};
|
||||
|
||||
const bioDemoSubject: Subject = {
|
||||
name: "Biology",
|
||||
completionPct: 35,
|
||||
chapters: [
|
||||
{
|
||||
name: "Cell Structure",
|
||||
isExpanded: true,
|
||||
topics: [
|
||||
{ name: "Cell Wall", status: "Practiced", accuracy: 80, questionsAttempted: 60 },
|
||||
{ name: "Nucleus", status: "In Progress", accuracy: 50, questionsAttempted: 25 },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const mathZeroSubject: Subject = {
|
||||
name: "Mathematics",
|
||||
completionPct: 0,
|
||||
chapters: [
|
||||
{
|
||||
name: "Calculus",
|
||||
isExpanded: true,
|
||||
topics: [
|
||||
{ name: "Limits", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Derivatives", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const bioZeroSubject: Subject = {
|
||||
name: "Biology",
|
||||
completionPct: 0,
|
||||
chapters: [
|
||||
{
|
||||
name: "Cell Structure",
|
||||
isExpanded: true,
|
||||
topics: [
|
||||
{ name: "Cell Wall", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
{ name: "Nucleus", status: "Not Started", accuracy: 0, questionsAttempted: 0 },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
const base = isDemo ? [...DEMO_SUBJECTS] : [...ZERO_SUBJECTS];
|
||||
base.push(isDemo ? (isNeet ? bioDemoSubject : mathDemoSubject) : (isNeet ? bioZeroSubject : mathZeroSubject));
|
||||
|
||||
setSubjects(getSubjects(isDemo));
|
||||
setSubjects(base);
|
||||
}, [isDemo, user?.target_exam]);
|
||||
|
||||
const toggleChapter = (subjectIndex: number, chapterIndex: number) => {
|
||||
|
||||
Reference in New Issue
Block a user