ElectronicBabylonianLiterature/ebl-frontend

View on GitHub
src/common/ErrorAlert.tsx

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import React from 'react'
import { Alert } from 'react-bootstrap'

export default function ErrorAlert({
  error,
}: {
  error: Error | null
}): JSX.Element | null {
  return error && <Alert variant="danger">{error.message}</Alert>
}