lbry-desktop/ui/component/claimTilesDiscover/index.js

24 lines
971 B
JavaScript
Raw Normal View History

2020-01-20 17:47:03 +01:00
import { connect } from 'react-redux';
import { doClaimSearch, selectClaimSearchByQuery, selectFetchingClaimSearchByQuery, SETTINGS } from 'lbry-redux';
2021-02-25 18:43:56 +01:00
import { selectMutedChannels } from 'redux/selectors/blocked';
2021-03-02 22:22:25 +01:00
import { selectModerationBlockList } from 'redux/selectors/comments';
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
2020-01-20 17:47:03 +01:00
import { makeSelectClientSetting } from 'redux/selectors/settings';
import ClaimListDiscover from './view';
2021-02-25 18:43:56 +01:00
const select = (state) => ({
2020-01-20 17:47:03 +01:00
claimSearchByQuery: selectClaimSearchByQuery(state),
fetchingClaimSearchByQuery: selectFetchingClaimSearchByQuery(state),
2020-01-20 17:47:03 +01:00
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
2021-03-02 22:22:25 +01:00
mutedUris: selectMutedChannels(state),
blockedUris: selectModerationBlockList(state),
2020-01-20 17:47:03 +01:00
});
const perform = {
doClaimSearch,
doToggleTagFollowDesktop,
2020-01-20 17:47:03 +01:00
};
export default connect(select, perform)(ClaimListDiscover);