2021-08-12 09:10:44 +02:00
|
|
|
import { connect } from 'react-redux';
|
2021-11-24 15:33:34 +01:00
|
|
|
import { selectClaimForUri, selectClaimIsMine } from 'redux/selectors/claims';
|
2021-08-12 09:10:44 +02:00
|
|
|
import { doHideModal } from 'redux/actions/app';
|
|
|
|
import { doCommentModBlock, doCommentModBlockAsAdmin, doCommentModBlockAsModerator } from 'redux/actions/comments';
|
|
|
|
import { selectActiveChannelClaim } from 'redux/selectors/app';
|
|
|
|
import { selectModerationDelegatorsById } from 'redux/selectors/comments';
|
|
|
|
|
|
|
|
import ModalBlockChannel from './view';
|
|
|
|
|
2021-11-24 15:33:34 +01:00
|
|
|
const select = (state, props) => {
|
|
|
|
const contentClaim = selectClaimForUri(state, props.contentUri);
|
|
|
|
return {
|
|
|
|
activeChannelClaim: selectActiveChannelClaim(state),
|
|
|
|
contentClaim,
|
|
|
|
contentClaimIsMine: selectClaimIsMine(state, contentClaim),
|
|
|
|
moderationDelegatorsById: selectModerationDelegatorsById(state),
|
|
|
|
};
|
|
|
|
};
|
2021-08-12 09:10:44 +02:00
|
|
|
|
2021-11-09 15:43:02 +01:00
|
|
|
const perform = {
|
|
|
|
doHideModal,
|
|
|
|
doCommentModBlock,
|
|
|
|
doCommentModBlockAsAdmin,
|
|
|
|
doCommentModBlockAsModerator,
|
|
|
|
};
|
2021-08-12 09:10:44 +02:00
|
|
|
|
|
|
|
export default connect(select, perform)(ModalBlockChannel);
|