Simplify Settings mapDispatch
This commit is contained in:
parent
3209238562
commit
962f7d1eb0
File diff suppressed because one or more lines are too long
@ -1,4 +1,3 @@
|
||||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import { createStructuredSelector } from 'reselect';
|
||||
import Settings from 'components/pages/Settings';
|
||||
@ -8,10 +7,10 @@ const mapState = createStructuredSelector({
|
||||
settings: getSettings
|
||||
});
|
||||
|
||||
const mapDispatch = dispatch => ({
|
||||
onCertChange(name, data) { dispatch(setCert(name, data)); },
|
||||
onKeyChange(name, data) { dispatch(setKey(name, data)); },
|
||||
...bindActionCreators({ uploadCert }, dispatch)
|
||||
});
|
||||
const mapDispatch = {
|
||||
onCertChange: setCert,
|
||||
onKeyChange: setKey,
|
||||
uploadCert
|
||||
};
|
||||
|
||||
export default connect(mapState, mapDispatch)(Settings);
|
||||
|
Loading…
Reference in New Issue
Block a user