Module: Home

Home Component Displays the list of registered persons and a button to navigate to the registration form. Includes a modal to confirm user deletion and handles the deletion process.
Parameters:
Name Type Description
props Object The component props.
Properties
Name Type Attributes Description
persons Array.<Object> Array of person objects to display.
loading boolean <optional>
Indicates if the user list is currently loading.
serverError string | null <optional>
Error message to display if fetching users failed.
onUserDeleted function Callback when a user is deleted.
Source:
Returns:
Type
JSX.Element

Methods

(async, private, inner) handleConfirmDelete() → {Promise.<void>}

Handles the confirmation of user deletion from the modal. Calls the API to delete the user, displays a toast notification, and triggers the parent callback or reloads the page.
Source:
Returns:
Type
Promise.<void>

(private, inner) handleDeleteClick(person)

Handles the click event on the delete button for a specific user. Opens the confirmation modal and sets the selected person for deletion.
Parameters:
Name Type Description
person Object The person object to be deleted.
Source:

(private, inner) handleGoToForm()

Navigate to the registration form.
Source: