import React, { useState } from "react"; import PropTypes from "prop-types"; import InputRange from "react-input-range"; import { Settings } from "Stores/Settings"; const FetchConfiguration = ({ settingsStore }) => { const [fetchInterval, setFetchInterval] = useState( settingsStore.fetchConfig.config.interval ); const onChangeComplete = (value) => { settingsStore.fetchConfig.setInterval(value); }; return (
`${value}s`} onChange={setFetchInterval} onChangeComplete={onChangeComplete} />
); }; FetchConfiguration.propTypes = { settingsStore: PropTypes.instanceOf(Settings).isRequired, }; export { FetchConfiguration };