Skip to content

Commit 8fd8dc1

Browse files
committed
fix some
1 parent 577e65b commit 8fd8dc1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

web/app/edit/profile/page.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ function EditProfile({ defaultValues }: { defaultValues: User }) {
4343
register,
4444
handleSubmit,
4545
getValues,
46+
setValue,
4647
formState: { errors },
4748
} = useForm({
4849
defaultValues: defaultValues,
@@ -52,12 +53,9 @@ function EditProfile({ defaultValues }: { defaultValues: User }) {
5253
async function submit(data: User) {
5354
await update(data);
5455
}
55-
56-
const [savedData, setSavedData] = useState(defaultValues); // TODO: unused
57-
5856
function afterPhotoUpload(result: string) {
5957
try {
60-
updateData("pictureUrl", result); // TODO: no such function
58+
setValue("pictureUrl", result);
6159
} catch (err) {
6260
console.error(err);
6361
// probably a network error

0 commit comments

Comments
 (0)