From a7d5f749d2e60db7db16a12c71df3ea6fde10963 Mon Sep 17 00:00:00 2001 From: TI JONNY Date: Mon, 9 Dec 2024 15:09:53 -0300 Subject: [PATCH] fix: fouls register --- .env | 4 ++-- .../MeetingList/Meeting/Beneficiarios/index.tsx | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.env b/.env index 7c3a28b..77602a0 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -# REACT_APP_API_PATH=http://localhost:3000/ -REACT_APP_API_PATH=https://br-ipti-beneficiarios.azurewebsites.net/ \ No newline at end of file +REACT_APP_API_PATH=http://localhost:3000/ +# REACT_APP_API_PATH=https://br-ipti-beneficiarios.azurewebsites.net/ \ No newline at end of file diff --git a/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx b/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx index b8f6992..6ce3d96 100644 --- a/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx +++ b/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx @@ -44,9 +44,11 @@ const Beneficiarios = () => { const FilterRegistration = (fouls: any) => { - const array = []; + const array: any = []; for (const foul of fouls) { - array.push(foul.registration); + if (!array!.find((props: any) => props === foul.id)) { + array.push(foul.registration); + } } return array; }; @@ -100,9 +102,10 @@ const Beneficiarios = () => { }, [props.meeting]); const FilterId = (fouls: any) => { - const array = []; + const array: any = []; for (const foul of fouls) { - array.push(foul.id); + if (!array!.find((props: any) => props === foul.id)) + array.push(foul.id); } return array;