feat: add merge user component
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m10s
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m10s
This commit is contained in:
parent
85d550a11d
commit
88c8dc48ae
2 changed files with 14 additions and 10 deletions
|
|
@ -66,8 +66,9 @@ export default function Profile({ user }: { user: User }) {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{!user.pastStudentId && (
|
||||
<>
|
||||
<Separator />
|
||||
|
||||
<MatchStudent
|
||||
firstName={user.firstName}
|
||||
lastName={user.lastName}
|
||||
|
|
@ -75,6 +76,8 @@ export default function Profile({ user }: { user: User }) {
|
|||
window.location.reload();
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Separator />
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export const getStudentMatch = async (
|
|||
};
|
||||
|
||||
export const mergeStudent = async (studentId: string) => {
|
||||
return makePostRequest("/api/merge-student", { studentId });
|
||||
return makePostRequest("/api/merge-student", { pastStudentId: studentId });
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -118,6 +118,7 @@ const defaultUser = {
|
|||
email: "",
|
||||
className: "",
|
||||
preferences: [] as UserPreferences,
|
||||
pastStudentId: null as string | null,
|
||||
};
|
||||
|
||||
export type User = typeof defaultUser;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue