From 43df3842341e01d789e9f115ddeb54a383a2e124 Mon Sep 17 00:00:00 2001 From: Janderson Souza Matias Date: Tue, 25 Jul 2023 23:14:55 -0300 Subject: [PATCH] adjust build --- src/pages/Competencies/CompetenceForm/index.tsx | 11 +++++++---- src/pages/Schools/index.tsx | 3 ++- 2 files changed, 9 insertions(+), 5 deletions(-) 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();