From 872de6329c7418e2de4914156defaf3ce4d903e4 Mon Sep 17 00:00:00 2001 From: Rushikesh-Sonawane99 Date: Fri, 22 Nov 2024 12:22:03 +0530 Subject: [PATCH] Issue #PS-2586 bug: Resolved Pie chart need be hide when there no data in the cohort issue --- src/pages/board-enrollment/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pages/board-enrollment/index.tsx b/src/pages/board-enrollment/index.tsx index 67e584ef..7a8d304d 100644 --- a/src/pages/board-enrollment/index.tsx +++ b/src/pages/board-enrollment/index.tsx @@ -157,6 +157,9 @@ const BoardEnrollment = () => { console.log('centerDetails', formattedMembers); // setDisplayStudentList(formattedMembers); setTotalLearners(formattedMembers.length); + if (formattedMembers.length === 0){ + setDisplayStudentList([]) + } if (formattedMembers.length > 0) { const formData = await fetchFormData(); @@ -544,7 +547,7 @@ const BoardEnrollment = () => { - + {totalLearners !== 0 ? : null} { {t('BOARD_ENROLMENT.TOTAL_LEARNERS')}: {totalLearners} + {displayStudentList.length >= 1 ? ( <> {displayStudentList?.map((item: any, index: any) => {