2019-07-08 22:54:58 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-06-16 04:27:58 +02:00
|
|
|
import { doFetchModBlockedList, doFetchCommentModAmIList } from 'redux/actions/comments';
|
2021-03-03 19:50:16 +01:00
|
|
|
import { selectMutedChannels } from 'redux/selectors/blocked';
|
2021-06-16 04:27:58 +02:00
|
|
|
import {
|
|
|
|
selectModerationBlockList,
|
|
|
|
selectAdminBlockList,
|
|
|
|
selectModeratorBlockList,
|
|
|
|
selectModeratorBlockListDelegatorsMap,
|
|
|
|
selectFetchingModerationBlockList,
|
|
|
|
selectModerationDelegatorsById,
|
2021-08-20 09:18:54 +02:00
|
|
|
selectAdminTimeoutMap,
|
|
|
|
selectModeratorTimeoutMap,
|
|
|
|
selectPersonalTimeoutMap,
|
2021-06-16 04:27:58 +02:00
|
|
|
} from 'redux/selectors/comments';
|
2021-11-08 07:27:14 +01:00
|
|
|
import { selectMyChannelClaimIds } from 'redux/selectors/claims';
|
2019-07-08 22:54:58 +02:00
|
|
|
import ListBlocked from './view';
|
|
|
|
|
2021-03-03 19:50:16 +01:00
|
|
|
const select = (state) => ({
|
|
|
|
mutedUris: selectMutedChannels(state),
|
2021-06-16 04:27:58 +02:00
|
|
|
personalBlockList: selectModerationBlockList(state),
|
|
|
|
adminBlockList: selectAdminBlockList(state),
|
|
|
|
moderatorBlockList: selectModeratorBlockList(state),
|
2021-08-20 09:18:54 +02:00
|
|
|
personalTimeoutMap: selectPersonalTimeoutMap(state),
|
|
|
|
adminTimeoutMap: selectAdminTimeoutMap(state),
|
|
|
|
moderatorTimeoutMap: selectModeratorTimeoutMap(state),
|
2021-06-16 04:27:58 +02:00
|
|
|
moderatorBlockListDelegatorsMap: selectModeratorBlockListDelegatorsMap(state),
|
|
|
|
delegatorsById: selectModerationDelegatorsById(state),
|
2021-11-08 07:27:14 +01:00
|
|
|
myChannelClaimIds: selectMyChannelClaimIds(state),
|
2021-03-03 19:50:16 +01:00
|
|
|
fetchingModerationBlockList: selectFetchingModerationBlockList(state),
|
2019-07-08 22:54:58 +02:00
|
|
|
});
|
|
|
|
|
2021-06-07 19:37:33 +02:00
|
|
|
const perform = (dispatch) => ({
|
|
|
|
fetchModBlockedList: () => dispatch(doFetchModBlockedList()),
|
2021-06-16 04:27:58 +02:00
|
|
|
fetchModAmIList: () => dispatch(doFetchCommentModAmIList()),
|
2021-06-07 19:37:33 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(ListBlocked);
|