lbry-desktop/ui/modal/modalCustomizeHomepage/index.js
infinite-persistence cc0ed44bf6 Homepage: add "reset" + 'hideByDefault' categories
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.
2022-05-26 10:59:31 -04:00

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);