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>
</div> </div>
{!user.pastStudentId && (
<>
<Separator /> <Separator />
<MatchStudent <MatchStudent
firstName={user.firstName} firstName={user.firstName}
lastName={user.lastName} lastName={user.lastName}
@ -75,6 +76,8 @@ export default function Profile({ user }: { user: User }) {
window.location.reload(); window.location.reload();
}} }}
/> />
</>
)}
<Separator /> <Separator />

View file

@ -97,7 +97,7 @@ export const getStudentMatch = async (
}; };
export const mergeStudent = async (studentId: string) => { 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: "", email: "",
className: "", className: "",
preferences: [] as UserPreferences, preferences: [] as UserPreferences,
pastStudentId: null as string | null,
}; };
export type User = typeof defaultUser; export type User = typeof defaultUser;