lbry-desktop/ui/page/listBlocked/index.js

38 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

import { connect } from 'react-redux';
2021-06-16 04:27:58 +02:00
import { doFetchModBlockedList, doFetchCommentModAmIList } from 'redux/actions/comments';
import { selectMutedChannels } from 'redux/selectors/blocked';
2021-06-16 04:27:58 +02:00
import {
selectModerationBlockList,
selectAdminBlockList,
selectModeratorBlockList,
selectModeratorBlockListDelegatorsMap,
selectFetchingModerationBlockList,
selectModerationDelegatorsById,
selectAdminTimeoutMap,
selectModeratorTimeoutMap,
selectPersonalTimeoutMap,
2021-06-16 04:27:58 +02:00
} from 'redux/selectors/comments';
import { selectMyChannelClaims } from 'lbry-redux';
import ListBlocked from './view';
const select = (state) => ({
mutedUris: selectMutedChannels(state),
2021-06-16 04:27:58 +02:00
personalBlockList: selectModerationBlockList(state),
adminBlockList: selectAdminBlockList(state),
moderatorBlockList: selectModeratorBlockList(state),
personalTimeoutMap: selectPersonalTimeoutMap(state),
adminTimeoutMap: selectAdminTimeoutMap(state),
moderatorTimeoutMap: selectModeratorTimeoutMap(state),
2021-06-16 04:27:58 +02:00
moderatorBlockListDelegatorsMap: selectModeratorBlockListDelegatorsMap(state),
delegatorsById: selectModerationDelegatorsById(state),
myChannelClaims: selectMyChannelClaims(state),
fetchingModerationBlockList: selectFetchingModerationBlockList(state),
});
const perform = (dispatch) => ({
fetchModBlockedList: () => dispatch(doFetchModBlockedList()),
2021-06-16 04:27:58 +02:00
fetchModAmIList: () => dispatch(doFetchCommentModAmIList()),
});
export default connect(select, perform)(ListBlocked);