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

35 lines
1.3 KiB
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,
selectClaimSearchByQueryLastPageReached,
selectFetchingClaimSearch,
SETTINGS,
} from 'lbry-redux';
import { selectFollowedTags } from 'redux/selectors/tags';
import { selectMutedChannels } from 'redux/selectors/blocked';
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
2021-03-31 22:55:26 +02:00
import { makeSelectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
import { selectModerationBlockList } from 'redux/selectors/comments';
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),
claimSearchByQueryLastPageReached: selectClaimSearchByQueryLastPageReached(state),
2019-06-11 20:10:58 +02:00
loading: selectFetchingClaimSearch(state),
2021-03-31 22:55:26 +02:00
showNsfw: selectShowMatureContent(state),
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
2020-11-25 19:04:07 +01:00
languageSetting: selectLanguage(state),
mutedUris: selectMutedChannels(state),
blockedUris: selectModerationBlockList(state),
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(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)(ClaimListDiscover);