diff --git a/src/components/NewTableComponent/StudentModal.tsx b/src/components/NewTableComponent/StudentModal.tsx index 517bdc8f..2f33ae0f 100644 --- a/src/components/NewTableComponent/StudentModal.tsx +++ b/src/components/NewTableComponent/StudentModal.tsx @@ -111,7 +111,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 { @@ -140,10 +139,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); } @@ -262,13 +261,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'} @@ -283,24 +282,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'} @@ -334,7 +333,7 @@ export default function StudentModal({ open, setOpen, id }) { {resume.verified.toString()} - )) : 'NA'} + )) : 'N/A'} @@ -355,7 +354,7 @@ export default function StudentModal({ open, setOpen, id }) { {penalty.penalty} {penalty.reason} - )) : 'NA'} + )) : 'N/A'} @@ -390,7 +389,7 @@ export default function StudentModal({ open, setOpen, id }) { - )) : 'NA'} + )) : 'N/A'} diff --git a/src/helpers/api.ts b/src/helpers/api.ts index 57fd6e08..407468c6 100644 --- a/src/helpers/api.ts +++ b/src/helpers/api.ts @@ -221,7 +221,6 @@ export const fetchSeasonData = async ( } ); const json = await res.json(); - console.log(json); return json; };