2020-02-19 07:31:40 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doSetDaemonSetting } from 'redux/actions/settings';
|
2020-02-24 19:20:45 +01:00
|
|
|
import { doSetWelcomeVersion, doToggle3PAnalytics, doSignOut } from 'redux/actions/app';
|
2020-02-19 07:31:40 +01:00
|
|
|
import { DAEMON_SETTINGS } from 'lbry-redux';
|
|
|
|
import { WELCOME_VERSION } from 'config.js';
|
2020-02-24 19:20:45 +01:00
|
|
|
import { selectUserVerifiedEmail } from 'lbryinc';
|
|
|
|
import PrivacyAgreement from './view';
|
|
|
|
|
|
|
|
const select = state => ({
|
|
|
|
authenticated: selectUserVerifiedEmail(state),
|
|
|
|
});
|
2020-02-19 07:31:40 +01:00
|
|
|
|
|
|
|
const perform = dispatch => ({
|
|
|
|
setWelcomeVersion: version => dispatch(doSetWelcomeVersion(version || WELCOME_VERSION)),
|
|
|
|
setShareDataInternal: share => dispatch(doSetDaemonSetting(DAEMON_SETTINGS.SHARE_USAGE_DATA, share)),
|
|
|
|
setShareDataThirdParty: share => dispatch(doToggle3PAnalytics(share)),
|
2020-02-24 19:20:45 +01:00
|
|
|
signOut: () => dispatch(doSignOut()),
|
2020-02-19 07:31:40 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(
|
2020-02-24 19:20:45 +01:00
|
|
|
select,
|
2020-02-19 07:31:40 +01:00
|
|
|
perform
|
|
|
|
)(PrivacyAgreement);
|