summaryrefslogtreecommitdiffhomepage
path: root/frontend/src/pages/LaunchError.tsx
blob: 80633e926c474568ab52b21c17e28adb8bc278a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { faExclamationTriangle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { FunctionComponent } from "react";
import { Alert, Button, Container } from "react-bootstrap";
import { Reload } from "utilities";

interface Props {
  children: string;
}

const LaunchError: FunctionComponent<Props> = ({ children }) => (
  <Container className="my-3">
    <Alert
      className="d-flex flex-nowrap justify-content-between align-items-center"
      variant="danger"
    >
      <div>
        <FontAwesomeIcon
          className="mr-2"
          icon={faExclamationTriangle}
        ></FontAwesomeIcon>
        <span>{children}</span>
      </div>
      <Button variant="outline-danger" onClick={Reload}>
        Reload
      </Button>
    </Alert>
  </Container>
);

export default LaunchError;