Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 26 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 0% |
Changes | 0 |
1 | import React from 'react'; |
||
2 | import { Card, CardBody, CardHeader } from 'reactstrap'; |
||
3 | import PropTypes from 'prop-types'; |
||
4 | import Checkbox from '../utils/Checkbox'; |
||
5 | import { SettingsType } from './reducers/settings'; |
||
6 | |||
7 | const propTypes = { |
||
8 | settings: SettingsType, |
||
9 | setRealTimeUpdates: PropTypes.func, |
||
10 | }; |
||
11 | |||
12 | const RealTimeUpdates = ({ settings: { realTimeUpdates }, setRealTimeUpdates }) => ( |
||
13 | <Card> |
||
14 | <CardHeader>Real-time updates</CardHeader> |
||
15 | <CardBody> |
||
16 | <Checkbox checked={realTimeUpdates.enabled} onChange={setRealTimeUpdates}> |
||
17 | Enable or disable real-time updates, when using Shlink v2.2.0 or newer. |
||
18 | </Checkbox> |
||
19 | </CardBody> |
||
20 | </Card> |
||
21 | ); |
||
22 | |||
23 | RealTimeUpdates.propTypes = propTypes; |
||
24 | |||
25 | export default RealTimeUpdates; |
||
26 |