Presentational "edit profile" form.
Editable name and email plus a read-only username. The edited values are handed to onSubmit; persistence is the caller's responsibility.
onSubmit
Props: see ProfileEditProps.
ProfileEditProps
<ProfileEdit name={user.name} username={user.username} email={user.email} onSubmit={async ({ name, email }) => { await api.patch("/profile", { name, email }); }} onBack={() => navigate(-1)}/> Copy
<ProfileEdit name={user.name} username={user.username} email={user.email} onSubmit={async ({ name, email }) => { await api.patch("/profile", { name, email }); }} onBack={() => navigate(-1)}/>
Presentational "edit profile" form.
Editable name and email plus a read-only username. The edited values are handed to
onSubmit; persistence is the caller's responsibility.Props: see
ProfileEditProps.