import React from 'react';
import { useDispatch } from 'react-redux';
import { cleanErrorMessage } from "../../store/rehab/main";
import "./style.css";

var ErrorMessageComponent = function ErrorMessageComponent(props) {
  var dispatch = useDispatch();

  var onOk = function onOk() {
    dispatch(cleanErrorMessage());
  };

  return /*#__PURE__*/React.createElement("div", {
    className: "result-record"
  }, /*#__PURE__*/React.createElement("div", {
    className: "container"
  }, /*#__PURE__*/React.createElement("h2", {
    className: "splash-subtitle"
  }, props.errorMessage), /*#__PURE__*/React.createElement("button", {
    className: "btn-outline",
    onClick: onOk
  }, "Try again")));
};

export default ErrorMessageComponent;