2019-06-11 14:10:58 -04:00
|
|
|
import { connect } from 'react-redux';
|
2019-08-01 20:56:25 -04:00
|
|
|
import {
|
|
|
|
doClaimSearch,
|
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,
|
2020-02-28 12:12:19 -05:00
|
|
|
SETTINGS,
|
2019-08-01 20:56:25 -04:00
|
|
|
} from 'lbry-redux';
|
2020-10-05 14:31:51 -04:00
|
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
2020-07-15 09:50:08 -04:00
|
|
|
import { selectBlockedChannels } from 'redux/selectors/blocked';
|
2020-03-09 19:46:37 -04:00
|
|
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
2020-11-20 08:21:31 -05:00
|
|
|
import { makeSelectClientSetting, selectLanguage } from 'redux/selectors/settings';
|
2019-06-19 01:05:43 -04:00
|
|
|
import ClaimListDiscover from './view';
|
2019-06-11 14:10:58 -04: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),
|
2019-06-11 14:10:58 -04:00
|
|
|
loading: selectFetchingClaimSearch(state),
|
2019-09-17 14:49:03 -04:00
|
|
|
showNsfw: makeSelectClientSetting(SETTINGS.SHOW_MATURE)(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),
|
2019-08-01 20:56:25 -04:00
|
|
|
hiddenUris: selectBlockedChannels(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,
|
2019-06-11 14:10:58 -04:00
|
|
|
};
|
|
|
|
|
2020-04-15 12:43:22 -04:00
|
|
|
export default connect(select, perform)(ClaimListDiscover);
|