xcv58/Custom-JavaScript-for-Websites-2

View on GitHub
src/js/components/Error.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react'
import {
  Dialog,
  DialogContent,
  DialogContentText,
  DialogTitle
} from '@material-ui/core'
import Hosts from 'components/Hosts'

export default ({ error }) => (
  <Dialog open>
    <DialogTitle>Invalid Pattern</DialogTitle>
    <DialogContent>
      <DialogContentText>
        The pattern in the URL is invalid, details: <strong>{error}</strong>.
        Please choose a valid host from below or click the extension icon in the
        webpage you want to inject:
      </DialogContentText>
      <Hosts />
    </DialogContent>
  </Dialog>
)