cc0ed44bf6
Requires a related commit from the homepages repo. ## Changes - Add ability to reset the sort order. - Make 'News' and 'Wild West' a "hideByDefault" category. It can be made visible in the homepage from the customization dialog.
22 lines
746 B
JavaScript
22 lines
746 B
JavaScript
import { connect } from 'react-redux';
|
|
import ModalCustomizeHomepage from './view';
|
|
import * as SETTINGS from 'constants/settings';
|
|
import { doHideModal, doOpenModal } from 'redux/actions/app';
|
|
import { doToast } from 'redux/actions/notifications';
|
|
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,
|
|
doToast,
|
|
doOpenModal,
|
|
doHideModal,
|
|
};
|
|
|
|
export default connect(select, perform)(ModalCustomizeHomepage);
|