2020-06-19 16:18:12 -04:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
|
|
|
import { selectosNotificationsEnabled } from 'redux/selectors/settings';
|
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
2021-07-06 09:29:46 +08:00
|
|
|
import NotificationSettingsPage from './view';
|
2020-06-19 16:18:12 -04:00
|
|
|
|
2021-07-06 09:29:46 +08:00
|
|
|
const select = (state) => ({
|
2020-06-19 16:18:12 -04:00
|
|
|
osNotificationsEnabled: selectosNotificationsEnabled(state),
|
2020-11-09 16:07:14 -05:00
|
|
|
isAuthenticated: Boolean(selectUserVerifiedEmail(state)),
|
2020-06-19 16:18:12 -04:00
|
|
|
});
|
|
|
|
|
2021-07-06 09:29:46 +08:00
|
|
|
const perform = (dispatch) => ({
|
2020-06-19 16:18:12 -04:00
|
|
|
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
|
|
|
});
|
|
|
|
|
2021-07-06 09:29:46 +08:00
|
|
|
export default connect(select, perform)(NotificationSettingsPage);
|