Function ProfileEdit

  • 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.

    Parameters

    Returns Element

    <ProfileEdit
    name={user.name}
    username={user.username}
    email={user.email}
    onSubmit={async ({ name, email }) => { await api.patch("/profile", { name, email }); }}
    onBack={() => navigate(-1)}
    />