2017-12-21 18:08:54 -03:00
|
|
|
import { connect } from 'react-redux';
|
2021-08-08 11:13:04 +08:00
|
|
|
import { doEnterSettingsPage, doExitSettingsPage } from 'redux/actions/settings';
|
2021-08-09 13:50:11 +08:00
|
|
|
import { selectDaemonSettings, selectLanguage } from 'redux/selectors/settings';
|
2021-08-06 15:43:21 +08:00
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
2017-05-17 17:52:45 -04:00
|
|
|
|
2021-08-09 13:50:11 +08:00
|
|
|
import SettingsPage from './view';
|
|
|
|
|
2021-03-03 13:50:16 -05:00
|
|
|
const select = (state) => ({
|
2017-06-06 17:19:12 -04:00
|
|
|
daemonSettings: selectDaemonSettings(state),
|
2019-11-22 16:13:00 -05:00
|
|
|
isAuthenticated: selectUserVerifiedEmail(state),
|
2021-08-09 13:50:11 +08:00
|
|
|
language: selectLanguage(state),
|
2017-06-05 21:21:55 -07:00
|
|
|
});
|
2017-05-17 17:52:45 -04:00
|
|
|
|
2021-03-03 13:50:16 -05:00
|
|
|
const perform = (dispatch) => ({
|
2020-09-04 11:02:30 -04:00
|
|
|
enterSettings: () => dispatch(doEnterSettingsPage()),
|
|
|
|
exitSettings: () => dispatch(doExitSettingsPage()),
|
2017-06-05 21:21:55 -07:00
|
|
|
});
|
2017-05-17 17:52:45 -04:00
|
|
|
|
2020-04-15 12:43:22 -04:00
|
|
|
export default connect(select, perform)(SettingsPage);
|