feat: add merge user component
All checks were successful
Deploy to Netlify / Deploy to Netlify (push) Successful in 1m10s

This commit is contained in:
Nathan Lamy 2026-02-24 23:22:12 +01:00
parent 85d550a11d
commit 88c8dc48ae
2 changed files with 14 additions and 10 deletions

View file

@ -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 />

View file

@ -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;