src/settings/RealTimeUpdates.js
last analyzed

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 26
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 0
eloc 23
mnd 0
bc 0
fnc 0
dl 0
loc 26
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
ccs 0
cts 4
cp 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