badguardhome/client/src/containers/Settings.js

31 lines
744 B
JavaScript
Raw Normal View History

2018-08-30 14:25:33 +00:00
import { connect } from 'react-redux';
import { initSettings, toggleSetting } from '../actions';
2019-07-18 11:52:47 +00:00
import { getBlockedServices, setBlockedServices } from '../actions/services';
2019-08-30 15:35:27 +00:00
import { getStatsConfig, setStatsConfig, resetStats } from '../actions/stats';
2018-08-30 14:25:33 +00:00
import Settings from '../components/Settings';
const mapStateToProps = (state) => {
const { settings, services, stats } = state;
const props = {
settings,
2019-07-18 11:52:47 +00:00
services,
stats,
};
2018-08-30 14:25:33 +00:00
return props;
};
const mapDispatchToProps = {
initSettings,
toggleSetting,
2019-07-18 11:52:47 +00:00
getBlockedServices,
setBlockedServices,
getStatsConfig,
setStatsConfig,
2019-08-30 15:35:27 +00:00
resetStats,
2018-08-30 14:25:33 +00:00
};
export default connect(
mapStateToProps,
mapDispatchToProps,
)(Settings);