diff --git a/app/components/settings/profile.tsx b/app/components/settings/profile.tsx index 6444836..8ac4a8e 100644 --- a/app/components/settings/profile.tsx +++ b/app/components/settings/profile.tsx @@ -66,15 +66,18 @@ export default function Profile({ user }: { user: User }) { - - - { - window.location.reload(); - }} - /> + {!user.pastStudentId && ( + <> + + { + window.location.reload(); + }} + /> + + )} diff --git a/app/lib/api.ts b/app/lib/api.ts index 1304684..7a2531f 100644 --- a/app/lib/api.ts +++ b/app/lib/api.ts @@ -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;