2020-08-21 17:49:13 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-17 10:36:14 +02:00
|
|
|
import { selectFetchingClaimSearch } from 'redux/selectors/claims';
|
2020-10-05 20:31:51 +02:00
|
|
|
import { selectFollowedTags } from 'redux/selectors/tags';
|
2020-08-21 17:49:13 +02:00
|
|
|
import { doToggleTagFollowDesktop } from 'redux/actions/tags';
|
2021-11-23 05:29:04 +01:00
|
|
|
import { selectClientSetting, selectShowMatureContent, selectLanguage } from 'redux/selectors/settings';
|
2020-09-15 15:54:05 +02:00
|
|
|
import { doSetClientSetting } from 'redux/actions/settings';
|
2021-10-17 10:36:14 +02:00
|
|
|
import * as SETTINGS from 'constants/settings';
|
2020-11-10 17:07:00 +01:00
|
|
|
import ClaimListHeader from './view';
|
2020-08-21 17:49:13 +02:00
|
|
|
|
2021-03-31 22:55:26 +02:00
|
|
|
const select = (state) => ({
|
2020-08-21 17:49:13 +02:00
|
|
|
followedTags: selectFollowedTags(state),
|
|
|
|
loading: selectFetchingClaimSearch(state),
|
2021-03-31 22:55:26 +02:00
|
|
|
showNsfw: selectShowMatureContent(state),
|
2021-11-23 05:29:04 +01:00
|
|
|
searchInLanguage: selectClientSetting(state, SETTINGS.SEARCH_IN_LANGUAGE),
|
2020-11-20 14:21:31 +01:00
|
|
|
languageSetting: selectLanguage(state),
|
2020-08-21 17:49:13 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
const perform = {
|
|
|
|
doToggleTagFollowDesktop,
|
|
|
|
doSetClientSetting,
|
|
|
|
};
|
|
|
|
|
2020-11-10 17:07:00 +01:00
|
|
|
export default connect(select, perform)(ClaimListHeader);
|