dispatch/client/js/containers/Settings.js

30 lines
606 B
JavaScript
Raw Normal View History

import { createStructuredSelector } from 'reselect';
import Settings from 'components/pages/Settings';
import { appSet } from 'state/app';
2018-10-15 06:56:17 +00:00
import {
getSettings,
setSetting,
setCert,
setKey,
uploadCert
} from 'state/settings';
import connect from 'utils/connect';
2016-01-11 20:04:57 +00:00
const mapState = createStructuredSelector({
settings: getSettings,
installable: state => state.app.installable
});
2017-06-29 05:11:12 +00:00
const mapDispatch = {
onCertChange: setCert,
onKeyChange: setKey,
2018-10-15 06:56:17 +00:00
uploadCert,
setSetting,
onInstall: () => appSet('installable', null)
2017-06-29 05:11:12 +00:00
};
2018-05-28 01:16:05 +00:00
export default connect(
mapState,
mapDispatch
)(Settings);