From b2c4c5d2b2d5d3602889899b04795a4ae4433096 Mon Sep 17 00:00:00 2001 From: samnotfound404 Date: Wed, 10 Jul 2024 19:37:05 +0530 Subject: [PATCH] Comments update --- .../NewTableComponent/StudentModal.tsx | 23 +++++++++---------- src/helpers/api.ts | 1 - 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/components/NewTableComponent/StudentModal.tsx b/src/components/NewTableComponent/StudentModal.tsx index d7a927e8..dedf2e40 100644 --- a/src/components/NewTableComponent/StudentModal.tsx +++ b/src/components/NewTableComponent/StudentModal.tsx @@ -110,7 +110,6 @@ export default function StudentModal({ open, setOpen, id }) { } const data = await response.json(); setStudentData(data); - console.log('Student data:', data); } catch (error) { console.error('Error fetching student data:', error); } finally { @@ -139,10 +138,10 @@ export default function StudentModal({ open, setOpen, id }) { const allData = await response.json(); const filteredData = allData.filter((registration) => registration.student.id === studentId); - console.log('Filtered registration data:', filteredData); + setRegistrationData(filteredData); } catch (error) { - console.error('Error fetching registration data:', error); + } finally { setLoading(false); } @@ -259,13 +258,13 @@ export default function StudentModal({ open, setOpen, id }) { Email - {studentData.user ? studentData.user.email : 'NA'} + {studentData.user ? studentData.user.email : 'N/A'} Contact - {studentData.user ? studentData.user.contact : 'NA'} + {studentData.user ? studentData.user.contact : 'N/A'} @@ -280,24 +279,24 @@ export default function StudentModal({ open, setOpen, id }) { Branch - {studentData.program ? studentData.program.branch : 'NA'} + {studentData.program ? studentData.program.branch : 'N/A'} Course - {studentData.program ? studentData.program.course : 'NA'} + {studentData.program ? studentData.program.course : 'N/A'} Year - {studentData.program ? studentData.program.year : 'NA'} + {studentData.program ? studentData.program.year : 'N/A'} Department - {studentData.program ? studentData.program.department : 'NA'} + {studentData.program ? studentData.program.department : 'N/A'} @@ -331,7 +330,7 @@ export default function StudentModal({ open, setOpen, id }) { {resume.verified.toString()} - )) : 'NA'} + )) : 'N/A'} @@ -352,7 +351,7 @@ export default function StudentModal({ open, setOpen, id }) { {penalty.penalty} {penalty.reason} - )) : 'NA'} + )) : 'N/A'} @@ -387,7 +386,7 @@ export default function StudentModal({ open, setOpen, id }) { - )) : 'NA'} + )) : 'N/A'} diff --git a/src/helpers/api.ts b/src/helpers/api.ts index fdd0d996..2aef9f99 100644 --- a/src/helpers/api.ts +++ b/src/helpers/api.ts @@ -218,7 +218,6 @@ export const fetchSeasonData = async ( } ); const json = await res.json(); - console.log(json); return json; };