d9bf72a351
sync settings backout nav cases and anon preference key more robust backout header put notificationSettings under backout bar review changes
20 lines
746 B
JavaScript
20 lines
746 B
JavaScript
import { connect } from 'react-redux';
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
|
import { selectEmailToVerify, selectUser } from 'redux/selectors/user';
|
|
import FirstRunEmailCollection from './view';
|
|
import { SETTINGS } from 'lbry-redux';
|
|
|
|
const select = state => ({
|
|
emailCollectionAcknowledged: makeSelectClientSetting(SETTINGS.EMAIL_COLLECTION_ACKNOWLEDGED)(state),
|
|
email: selectEmailToVerify(state),
|
|
user: selectUser(state),
|
|
});
|
|
|
|
const perform = dispatch => () => ({
|
|
acknowledgeEmail: () => {
|
|
dispatch(doSetClientSetting(SETTINGS.EMAIL_COLLECTION_ACKNOWLEDGED, true));
|
|
},
|
|
});
|
|
|
|
export default connect(select, perform)(FirstRunEmailCollection);
|