import { connect } from 'react-redux'; import { doEnterSettingsPage, doExitSettingsPage } from 'redux/actions/settings'; import { makeSelectClientSetting, selectDaemonSettings } from 'redux/selectors/settings'; import { SETTINGS } from 'lbry-redux'; import SettingsPage from './view'; import { selectUserVerifiedEmail } from 'redux/selectors/user'; const select = (state) => ({ daemonSettings: selectDaemonSettings(state), isAuthenticated: selectUserVerifiedEmail(state), autoDownload: makeSelectClientSetting(SETTINGS.AUTO_DOWNLOAD)(state), hideBalance: makeSelectClientSetting(SETTINGS.HIDE_BALANCE)(state), }); const perform = (dispatch) => ({ enterSettings: () => dispatch(doEnterSettingsPage()), exitSettings: () => dispatch(doExitSettingsPage()), }); export default connect(select, perform)(SettingsPage);