2019-06-11 20:10:58 +02:00
|
|
|
import { connect } from 'react-redux';
|
2019-08-02 02:56:25 +02:00
|
|
|
import {
|
|
|
|
doClaimSearch,
|
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-02-25 18:43:56 +01:00
|
|
|
import { selectMutedChannels } from 'redux/selectors/blocked';
|
2020-03-10 00:46:37 +01:00
|
|
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
2020-11-20 14:21:31 +01:00
|
|
|
import { makeSelectClientSetting, selectLanguage } from 'redux/selectors/settings';
|
2021-02-25 19:07:54 +01:00
|
|
|
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
|
|
|
|
2021-02-25 18:43:56 +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),
|
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-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-02-25 19:07:54 +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,
|
2019-06-11 20:10:58 +02:00
|
|
|
};
|
|
|
|
|
2020-04-15 18:43:22 +02:00
|
|
|
export default connect(select, perform)(ClaimListDiscover);
|