- client: add message when dns server is starting up

This commit is contained in:
Artem Baskal
2019-12-06 18:00:01 +03:00
parent 2b14a043a9
commit 1e429df3bc
29 changed files with 151 additions and 189 deletions

View File

@@ -1,23 +1,27 @@
import React from 'react';
import PropTypes from 'prop-types';
import { withNamespaces, Trans } from 'react-i18next';
import Card from '../ui/Card';
const Status = props => (
const Status = ({ message, buttonMessage, reloadPage }) => (
<div className="status">
<Card bodyType="card-body card-body--status">
<div className="h4 font-weight-light mb-4">
You are currently not using AdGuard Home
<Trans>{message}</Trans>
</div>
<button className="btn btn-success" onClick={props.handleStatusChange}>
Enable AdGuard Home
</button>
{buttonMessage &&
<button className="btn btn-success" onClick={reloadPage}>
<Trans>{buttonMessage}</Trans>
</button>}
</Card>
</div>
);
Status.propTypes = {
handleStatusChange: PropTypes.func.isRequired,
message: PropTypes.string.isRequired,
buttonMessage: PropTypes.string,
reloadPage: PropTypes.func,
};
export default Status;
export default withNamespaces()(Status);