2022-03-22 14:44:44 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import ModalCustomizeHomepage from './view';
|
|
|
|
import * as SETTINGS from 'constants/settings';
|
2022-05-25 15:28:18 +02:00
|
|
|
import { doHideModal, doOpenModal } from 'redux/actions/app';
|
|
|
|
import { doToast } from 'redux/actions/notifications';
|
2022-03-22 14:44:44 +01:00
|
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
|
|
|
import { selectClientSetting } from 'redux/selectors/settings';
|
|
|
|
import { selectHasOdyseeMembership } from 'redux/selectors/user';
|
|
|
|
|
|
|
|
const select = (state) => ({
|
|
|
|
hasMembership: selectHasOdyseeMembership(state),
|
|
|
|
homepageOrder: selectClientSetting(state, SETTINGS.HOMEPAGE_ORDER),
|
|
|
|
});
|
|
|
|
|
|
|
|
const perform = {
|
|
|
|
doSetClientSetting,
|
2022-05-25 15:28:18 +02:00
|
|
|
doToast,
|
|
|
|
doOpenModal,
|
2022-03-22 14:44:44 +01:00
|
|
|
doHideModal,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default connect(select, perform)(ModalCustomizeHomepage);
|