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