2018-08-30 14:25:33 +00:00
|
|
|
import React from 'react';
|
|
|
|
|
import PropTypes from 'prop-types';
|
2019-12-06 15:00:01 +00:00
|
|
|
import { withNamespaces, Trans } from 'react-i18next';
|
2018-08-30 14:25:33 +00:00
|
|
|
|
|
|
|
|
import Card from '../ui/Card';
|
|
|
|
|
|
2019-12-06 15:00:01 +00:00
|
|
|
const Status = ({ message, buttonMessage, reloadPage }) => (
|
2018-08-30 14:25:33 +00:00
|
|
|
<div className="status">
|
|
|
|
|
<Card bodyType="card-body card-body--status">
|
|
|
|
|
<div className="h4 font-weight-light mb-4">
|
2019-12-06 15:00:01 +00:00
|
|
|
<Trans>{message}</Trans>
|
2018-08-30 14:25:33 +00:00
|
|
|
</div>
|
2019-12-06 15:00:01 +00:00
|
|
|
{buttonMessage &&
|
|
|
|
|
<button className="btn btn-success" onClick={reloadPage}>
|
|
|
|
|
<Trans>{buttonMessage}</Trans>
|
|
|
|
|
</button>}
|
2018-08-30 14:25:33 +00:00
|
|
|
</Card>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
Status.propTypes = {
|
2019-12-06 15:00:01 +00:00
|
|
|
message: PropTypes.string.isRequired,
|
|
|
|
|
buttonMessage: PropTypes.string,
|
|
|
|
|
reloadPage: PropTypes.func,
|
2018-08-30 14:25:33 +00:00
|
|
|
};
|
|
|
|
|
|
2019-12-06 15:00:01 +00:00
|
|
|
export default withNamespaces()(Status);
|