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

32 lines
862 B
JavaScript
Raw Normal View History

2019-06-11 20:10:58 +02:00
import { connect } from 'react-redux';
import {
doClaimSearch,
2019-08-23 03:04:48 +02:00
selectClaimSearchByQuery,
selectFetchingClaimSearch,
selectBlockedChannels,
SETTINGS,
selectFollowedTags,
} from 'lbry-redux';
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
import { makeSelectClientSetting } from 'redux/selectors/settings';
2019-06-19 07:05:43 +02:00
import ClaimListDiscover from './view';
2019-06-11 20:10:58 +02:00
const select = state => ({
followedTags: selectFollowedTags(state),
2019-08-23 03:04:48 +02:00
claimSearchByQuery: selectClaimSearchByQuery(state),
2019-06-11 20:10:58 +02:00
loading: selectFetchingClaimSearch(state),
2019-09-17 20:49:03 +02:00
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(state),
2020-02-20 13:30:27 +01:00
showReposts: makeSelectClientSetting(SETTINGS.SHOW_REPOSTS)(state),
hiddenUris: selectBlockedChannels(state),
2019-06-11 20:10:58 +02:00
});
const perform = {
doClaimSearch,
doToggleTagFollowDesktop,
2019-06-11 20:10:58 +02:00
};
export default connect(
select,
perform
2019-06-19 07:05:43 +02:00
)(ClaimListDiscover);