Interface ProfileEditProps

Props for ProfileEdit.

interface ProfileEditProps {
    email: string;
    error?: null | string;
    loading?: boolean;
    name: string;
    onBack?: () => void;
    onSubmit: (data: { email: string; name: string }) => Promise<void>;
    username: string;
}

Properties

email: string

Initial email address.

error?: null | string

Error message to display beneath the form.

loading?: boolean

Shows a spinner and disables the actions.

name: string

Initial full name.

onBack?: () => void

When provided, renders a "Cancel" button that calls this.

onSubmit: (data: { email: string; name: string }) => Promise<void>

Called with the edited { name, email } on submit.

username: string

Username, rendered read-only.