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