diff --git a/src/components/iep/Iep.tsx b/src/components/iep/Iep.tsx index 54b0f4fa..b055e7c3 100644 --- a/src/components/iep/Iep.tsx +++ b/src/components/iep/Iep.tsx @@ -159,6 +159,7 @@ const Iep = ({ iep_id }: IepProps) => { src={noGoals} alt="no goals image" className={$Image.fitContent} + priority={true} />

No goals yet

diff --git a/src/pages/students/[student_id].tsx b/src/pages/students/[student_id].tsx index 1d50e43a..0601d33b 100644 --- a/src/pages/students/[student_id].tsx +++ b/src/pages/students/[student_id].tsx @@ -86,11 +86,13 @@ const ViewStudentPage = () => { grade: Number(data.get("grade")) || 0, }); - editIepMutation.mutate({ - student_id: student.student_id, - start_date: new Date(parseISO(data.get("start_date") as string)), - end_date: new Date(parseISO(data.get("end_date") as string)), - }); + if (activeIep) { + editIepMutation.mutate({ + student_id: student.student_id, + start_date: new Date(parseISO(data.get("start_date") as string)), + end_date: new Date(parseISO(data.get("end_date") as string)), + }); + } handleMainState(); }; @@ -163,7 +165,11 @@ const ViewStudentPage = () => {

- +
{ src={noGoals} alt="no IEP image" className={$Image.fitContent} + priority={true} />

This student does not have an active IEP. Please create one.