ErrorAlert component. This component is responsible for displaying an error alert message. It uses the alert and onClose props to determine the message and what happens when the alert is closed. The alert is displayed in a modal that is centered on the screen. The modal contains a title, the error message, and a close button. The visibility of the modal is controlled by the alert prop. If the alert prop is truthy, the modal is displayed; otherwise, it is hidden.

  • Parameters

    • props: ErrorAlertProps

      The props that define the error alert message and the close function.

    Returns ReactNode | Promise<ReactNode>

    The rendered ErrorAlert component.