Open benhuangbmj opened 3 months ago
Cause: The form in Profile
is technically nested in the form in Admin
, thus when the Profile form
is being submitted, the Admin form
submission will be triggered as well. Consequently, two put requests to the Contentful API are made simultaneously which causes a version conflict.
Solution: (ad hoc) Wrap the handleSubmit
of the Profile form
with a propagation stopper.
Suggestion: Investigate the codes in React Hook Form to see if there is any intrinsic solution.
What: When using the Profile popup in Admin to update the user info, the app would alert "update failed", then alert "updates successfully".