mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-13 19:13:46 +00:00
Migrated settings module to TS
This commit is contained in:
22
src/settings/RealTimeUpdates.tsx
Normal file
22
src/settings/RealTimeUpdates.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from 'react';
|
||||
import { Card, CardBody, CardHeader } from 'reactstrap';
|
||||
import ToggleSwitch from '../utils/ToggleSwitch';
|
||||
import { Settings } from './reducers/settings';
|
||||
|
||||
interface RealTimeUpdatesProps {
|
||||
settings: Settings;
|
||||
setRealTimeUpdates: (enabled: boolean) => void;
|
||||
}
|
||||
|
||||
const RealTimeUpdates = ({ settings: { realTimeUpdates }, setRealTimeUpdates }: RealTimeUpdatesProps) => (
|
||||
<Card>
|
||||
<CardHeader>Real-time updates</CardHeader>
|
||||
<CardBody>
|
||||
<ToggleSwitch checked={realTimeUpdates.enabled} onChange={setRealTimeUpdates}>
|
||||
Enable or disable real-time updates, when using Shlink v2.2.0 or newer.
|
||||
</ToggleSwitch>
|
||||
</CardBody>
|
||||
</Card>
|
||||
);
|
||||
|
||||
export default RealTimeUpdates;
|
||||
Reference in New Issue
Block a user