shlink-web-client/src/settings/RealTimeUpdates.js

26 lines
756 B
JavaScript
Raw Normal View History

import React from 'react';
2020-05-03 21:16:21 +03:00
import { Card, CardBody, CardHeader } from 'reactstrap';
import PropTypes from 'prop-types';
2020-07-14 17:05:00 +03:00
import ToggleSwitch from '../utils/ToggleSwitch';
import { SettingsType } from './reducers/settings';
const propTypes = {
settings: SettingsType,
setRealTimeUpdates: PropTypes.func,
};
const RealTimeUpdates = ({ settings: { realTimeUpdates }, setRealTimeUpdates }) => (
<Card>
<CardHeader>Real-time updates</CardHeader>
<CardBody>
2020-07-14 17:05:00 +03:00
<ToggleSwitch checked={realTimeUpdates.enabled} onChange={setRealTimeUpdates}>
Enable or disable real-time updates, when using Shlink v2.2.0 or newer.
2020-07-14 17:05:00 +03:00
</ToggleSwitch>
</CardBody>
</Card>
);
RealTimeUpdates.propTypes = propTypes;
export default RealTimeUpdates;