diff --git a/sections/src/AddSessionModal.js b/sections/src/AddSessionModal.js index 1aec0424..8f2605bd 100644 --- a/sections/src/AddSessionModal.js +++ b/sections/src/AddSessionModal.js @@ -31,7 +31,7 @@ export default function AddSessionModel({ section, show, onClose }: Props) { {startTimes.map((startTime) => ( - + {startTime.format("MMMM D")}{" "} {" "} diff --git a/sections/src/HistoryPage.js b/sections/src/HistoryPage.js index 40cf09b7..203f1318 100644 --- a/sections/src/HistoryPage.js +++ b/sections/src/HistoryPage.js @@ -64,25 +64,35 @@ export default function HistoryPage({ userID }: Props): React.Node { - {user.attendanceHistory.map(({ section, session, status }, i) => ( - - - {moment.unix(session.startTime).format("MMMM D")} - - - {section != null && currentUser.isStaff ? ( - - {sectionTitle(section)} - - ) : ( - sectionTitle(section) - )} - - - - - - ))} + {user.attendanceHistory.map(({ section, session, status }, i) => { + return ( + + + {moment.unix(session.startTime).format("MMMM D")} + + + {section != null && currentUser.isStaff ? ( + + {sectionTitle(section)} + + ) : ( + sectionTitle(section) + )} + + + + + + ); + })} diff --git a/sections/src/SessionAttendance.js b/sections/src/SessionAttendance.js index 7d4d5cf0..034fe215 100644 --- a/sections/src/SessionAttendance.js +++ b/sections/src/SessionAttendance.js @@ -129,14 +129,8 @@ export default function SectionAttendance({ section, session }: Props) { { - if (session != null) - setAttendance({ - session_id: session.id, - students: student.email, - status, - }); - }} + sessionId={session != null ? session.id: null} + email={session != null ? student.email: null} />