Skip to content

Commit

Permalink
fixed some bugs and deleted some log statements
Browse files Browse the repository at this point in the history
  • Loading branch information
adhi0331 committed Jun 15, 2024
1 parent 6d9b4af commit 953e86c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function NotificationTable({ firebaseToken }: NotificationsProps)
name={user.name}
email={user.email}
// account_type={user.role}
account_type={user.accountType} // console log shows correct property name is accountType
account_type={user.role} // console log shows correct property name is accountType
onApprove={() => handleApproveUser(user.email)}
onDeny={() => handleDenyUser(user.email)}
/>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/StudentsTable/StudentsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default function StudentsTable() {
obj[student._id] = student;
return obj;
}, {} as StudentMap);
console.log(result.data);

setAllStudents(studentsObject);
setIsLoading(false);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/hooks/redirect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const useRedirection = ({ checkShouldRedirect, redirectURL }: UseRedirect
*/
export const useRedirectToHomeIfSignedIn = () => {
useRedirection({
checkShouldRedirect: ({ firebaseUser, piaUser }) => firebaseUser !== null && piaUser !== null,
checkShouldRedirect: ({ firebaseUser, piaUser }) => firebaseUser !== null && piaUser !== null && piaUser.approvalStatus,
redirectURL: HOME_URL,
});
};
Expand Down

0 comments on commit 953e86c

Please sign in to comment.