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