We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 577e65b commit 8fd8dc1Copy full SHA for 8fd8dc1
web/app/edit/profile/page.tsx
@@ -43,6 +43,7 @@ function EditProfile({ defaultValues }: { defaultValues: User }) {
43
register,
44
handleSubmit,
45
getValues,
46
+ setValue,
47
formState: { errors },
48
} = useForm({
49
defaultValues: defaultValues,
@@ -52,12 +53,9 @@ function EditProfile({ defaultValues }: { defaultValues: User }) {
52
53
async function submit(data: User) {
54
await update(data);
55
}
-
56
- const [savedData, setSavedData] = useState(defaultValues); // TODO: unused
57
58
function afterPhotoUpload(result: string) {
59
try {
60
- updateData("pictureUrl", result); // TODO: no such function
+ setValue("pictureUrl", result);
61
} catch (err) {
62
console.error(err);
63
// probably a network error
0 commit comments