Function ProfileCreate

  • Presentational "complete your profile" form.

    Collects a full name and email and hands them to onSubmit; it performs no persistence itself. When defaultUsername is supplied it is rendered as a disabled field and used as the name fallback if the user leaves the name blank.

    Props: see ProfileCreateProps.

    Parameters

    Returns Element

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