throw if user not found

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-06-16 21:24:44 +02:00
parent 7d35f7e65c
commit 1fc64ef1f9
2 changed files with 6 additions and 2 deletions

View File

@@ -39,7 +39,11 @@ export default function EditProfile({ profile }: EditProfileProps) {
toast('Profile updated', {
description: 'Your profile has been updated.',
});
reset(res);
reset({
firstName: res.firstName ?? '',
lastName: res.lastName ?? '',
email: res.email,
});
router.refresh();
},
onError: handleError,