2019-07-08 16:54:58 -04:00
|
|
|
import { connect } from 'react-redux';
|
2020-06-23 16:21:30 -04:00
|
|
|
import {
|
|
|
|
selectChannelIsBlocked,
|
2020-06-23 16:21:40 -04:00
|
|
|
doToggleBlockChannel,
|
2020-06-23 16:21:30 -04:00
|
|
|
makeSelectClaimIsMine,
|
|
|
|
makeSelectShortUrlForUri,
|
|
|
|
makeSelectPermanentUrlForUri,
|
|
|
|
} from 'lbry-redux';
|
2020-06-12 16:44:25 -04:00
|
|
|
import { doToast } from 'redux/actions/notifications';
|
2019-07-08 16:54:58 -04:00
|
|
|
import BlockButton from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
channelIsBlocked: selectChannelIsBlocked(props.uri)(state),
|
2019-08-16 18:01:01 +01:00
|
|
|
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
|
2019-08-02 11:11:31 -04:00
|
|
|
shortUrl: makeSelectShortUrlForUri(props.uri)(state),
|
2019-09-04 00:22:31 -04:00
|
|
|
permanentUrl: makeSelectPermanentUrlForUri(props.uri)(state),
|
2019-07-08 16:54:58 -04:00
|
|
|
});
|
|
|
|
|
2020-06-12 16:44:25 -04:00
|
|
|
export default connect(select, {
|
|
|
|
toggleBlockChannel: doToggleBlockChannel,
|
|
|
|
doToast,
|
|
|
|
})(BlockButton);
|