import React from 'react'
import Typography from '@material-ui/core/Typography'
import Grid from '@material-ui/core/Grid'
import { CircularProgress } from '@material-ui/core'
import { Alert, AlertTitle } from '@material-ui/lab'
type ConfirmationProps = {
isLoading: boolean
progressMessage: string
successMessage: string
failureMessage: string
error: Error
}
export default function Confirmation({
isLoading,
progressMessage,
successMessage,
failureMessage,
error,
}: ConfirmationProps) {
return isLoading ? (
<>
{progressMessage}
>
) : (
<>
{error === null ? (
{successMessage}
) : (
{error.name}
{failureMessage} - {error.message}
)}
>
)
}