2018-08-30 14:25:33 +00:00
|
|
|
import { connect } from 'react-redux';
|
2018-09-21 15:50:06 +00:00
|
|
|
import { initSettings, toggleSetting, handleUpstreamChange, setUpstream, testUpstream, addErrorToast } from '../actions';
|
2018-08-30 14:25:33 +00:00
|
|
|
import Settings from '../components/Settings';
|
|
|
|
|
|
|
|
const mapStateToProps = (state) => {
|
|
|
|
const { settings } = state;
|
|
|
|
const props = { settings };
|
|
|
|
return props;
|
|
|
|
};
|
|
|
|
|
|
|
|
const mapDispatchToProps = {
|
|
|
|
initSettings,
|
|
|
|
toggleSetting,
|
|
|
|
handleUpstreamChange,
|
|
|
|
setUpstream,
|
2018-09-21 15:08:39 +00:00
|
|
|
testUpstream,
|
2018-09-21 15:50:06 +00:00
|
|
|
addErrorToast,
|
2018-08-30 14:25:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
mapStateToProps,
|
|
|
|
mapDispatchToProps,
|
|
|
|
)(Settings);
|