diff --git a/src/pages/Competencies/CompetenceForm/index.tsx b/src/pages/Competencies/CompetenceForm/index.tsx index 2d03ced..4ed5a1a 100644 --- a/src/pages/Competencies/CompetenceForm/index.tsx +++ b/src/pages/Competencies/CompetenceForm/index.tsx @@ -272,14 +272,17 @@ const CompetenceForm: React.FC = ({ )} - {competenceValues?.questions?.length > 0 && ( - - )} + {competenceValues?.questions && + competenceValues?.questions?.length > 0 && ( + + )} {showQuestionForm && editIndex === null && ( {`Question ${ - competenceValues?.questions?.length + 1 || 1 + (competenceValues?.questions && + competenceValues?.questions?.length + 1) || + 1 }`} Title diff --git a/src/pages/Schools/index.tsx b/src/pages/Schools/index.tsx index afb47d0..3ce2401 100644 --- a/src/pages/Schools/index.tsx +++ b/src/pages/Schools/index.tsx @@ -62,7 +62,8 @@ const SchoolsPage: React.FC = () => { const deleteSchool = async () => { setIsLoadingDelete(true); - if (schoolToDelete) await SchoolService.DeleteSchool(schoolToDelete?.id); + if (schoolToDelete) + await SchoolService.DeleteSchool(schoolToDelete?.id || ""); setIsLoadingDelete(false); onCloseDeleteModal(); loadSchools();