From 1fce7a0369e905480c84b800adb97209700958c0 Mon Sep 17 00:00:00 2001 From: Ansar Mahir Date: Sat, 14 Sep 2024 19:11:18 +0530 Subject: [PATCH] removed comments --- src/pages/MentorProfile/MentorProfile.component.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/MentorProfile/MentorProfile.component.tsx b/src/pages/MentorProfile/MentorProfile.component.tsx index 8e266f78..00f058ab 100644 --- a/src/pages/MentorProfile/MentorProfile.component.tsx +++ b/src/pages/MentorProfile/MentorProfile.component.tsx @@ -51,14 +51,13 @@ const MentorProfile: React.FC = () => { .catch(() => {}); }; - // Calculate the number of approved mentees once + const approvedMenteesCount = mentor?.mentees ? mentor.mentees.filter( (mentee) => mentee.state === ApplicationStatus.APPROVED ).length : 0; - // Calculate available slots const availableSlots = mentor?.application.noOfMentees ? Math.max(0, mentor.application.noOfMentees - approvedMenteesCount) : 0;