2019-01-22 19:29:45 +01:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
|
|
|
import { selectEmailToVerify, selectUser } from 'lbryinc';
|
|
|
|
import FirstRunEmailCollection from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
2019-05-07 23:38:29 +02:00
|
|
|
emailCollectionAcknowledged: makeSelectClientSetting(SETTINGS.EMAIL_COLLECTION_ACKNOWLEDGED)(state),
|
2019-01-22 19:29:45 +01:00
|
|
|
email: selectEmailToVerify(state),
|
|
|
|
user: selectUser(state),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = dispatch => () => ({
|
|
|
|
acknowledgeEmail: () => {
|
|
|
|
dispatch(doSetClientSetting(SETTINGS.EMAIL_COLLECTION_ACKNOWLEDGED, true));
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(FirstRunEmailCollection);
|