Skip to content

Commit

Permalink
Removed unnecessary lines
Browse files Browse the repository at this point in the history
  • Loading branch information
JayBae9903 committed Jan 23, 2024
1 parent 79ff2b3 commit 34c4c46
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,19 @@ const StudentApplicants = ({ setStudentApplicantResult }) => {
useEffect(() => {
const loadCurrentUser = async () => {
try {
// Assuming that 'user.getProfileInfo' is a function that returns the current user's profile
const profile = await user.getProfileInfo();
// Now we have the user's profile, set the first applicant's data
const initialApplicants = [
{ firstName: profile.FirstName, lastName: profile.LastName, email: profile.Email },
{ firstName: '', lastName: '', email: '' },
{ firstName: '', lastName: '', email: '' },
{ firstName: '', lastName: '', email: '' },
];
setApplicants(initialApplicants);
// Set the emails for the applicant result
setEmails(initialApplicants.map((a) => a.email));
} catch (error) {
console.error('Error fetching user data', error);
}
};

loadCurrentUser();
}, []);

Expand Down

0 comments on commit 34c4c46

Please sign in to comment.