- client: add message when dns server is starting up
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user