2019-06-11 14:10:58 -04:00
|
|
|
import { connect } from 'react-redux';
|
2019-08-01 20:56:25 -04:00
|
|
|
import {
|
2021-09-09 15:02:31 +08:00
|
|
|
selectClaimsByUri,
|
2019-08-22 21:04:48 -04:00
|
|
|
selectClaimSearchByQuery,
|
2020-07-12 14:28:41 +08:00
|
|
|
selectClaimSearchByQueryLastPageReached,
|
2019-08-01 20:56:25 -04:00
|
|
|
selectFetchingClaimSearch,
|
2021-10-07 23:47:39 -04:00
|
|
|
} from 'redux/selectors/claims';
|
|
|
|
import { doClaimSearch } from 'redux/actions/claims';
|
|
|
|
import * as SETTINGS from 'constants/settings';
|
2020-10-05 14:31:51 -04:00
|
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
2021-03-03 13:50:16 -05:00
|
|
|
import { selectMutedChannels } from 'redux/selectors/blocked';
|
2020-03-09 19:46:37 -04:00
|
|
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
2021-03-31 16:55:26 -04:00
|
|
|
import { makeSelectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
|
2021-03-03 13:50:16 -05:00
|
|
|
import { selectModerationBlockList } from 'redux/selectors/comments';
|
2019-06-19 01:05:43 -04:00
|
|
|
import ClaimListDiscover from './view';
|
2021-09-09 15:02:31 +08:00
|
|
|
import { doFetchViewCount } from 'lbryinc';
|
2021-07-03 13:19:23 -04:00
|
|
|
|
2021-03-03 13:50:16 -05:00
|
|
|
const select = (state) => ({
|
2020-03-11 21:43:52 -04:00
|
|
|
followedTags: selectFollowedTags(state),
|
2019-08-22 21:04:48 -04:00
|
|
|
claimSearchByQuery: selectClaimSearchByQuery(state),
|
2020-07-12 14:28:41 +08:00
|
|
|
claimSearchByQueryLastPageReached: selectClaimSearchByQueryLastPageReached(state),
|
2021-09-09 15:02:31 +08:00
|
|
|
claimsByUri: selectClaimsByUri(state),
|
2019-06-11 14:10:58 -04:00
|
|
|
loading: selectFetchingClaimSearch(state),
|
2021-03-31 16:55:26 -04:00
|
|
|
showNsfw: selectShowMatureContent(state),
|
2020-04-15 12:43:22 -04:00
|
|
|
hideReposts: makeSelectClientSetting(SETTINGS.HIDE_REPOSTS)(state),
|
2020-11-25 13:04:07 -05:00
|
|
|
languageSetting: selectLanguage(state),
|
2021-03-03 13:50:16 -05:00
|
|
|
mutedUris: selectMutedChannels(state),
|
|
|
|
blockedUris: selectModerationBlockList(state),
|
2020-10-15 13:56:55 -04:00
|
|
|
searchInLanguage: makeSelectClientSetting(SETTINGS.SEARCH_IN_LANGUAGE)(state),
|
2019-06-11 14:10:58 -04:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = {
|
|
|
|
doClaimSearch,
|
2020-03-09 19:46:37 -04:00
|
|
|
doToggleTagFollowDesktop,
|
2021-09-09 15:02:31 +08:00
|
|
|
doFetchViewCount,
|
2019-06-11 14:10:58 -04:00
|
|
|
};
|
|
|
|
|
2020-04-15 12:43:22 -04:00
|
|
|
export default connect(select, perform)(ClaimListDiscover);
|