2020-02-06 19:49:05 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import { doHideModal } from 'redux/actions/app';
|
|
|
|
import {
|
|
|
|
makeSelectClaimForUri,
|
|
|
|
makeSelectTitleForUri,
|
|
|
|
selectBalance,
|
|
|
|
selectMyChannelClaims,
|
|
|
|
doRepost,
|
|
|
|
selectRepostError,
|
|
|
|
selectRepostLoading,
|
|
|
|
doClearRepostError,
|
2020-02-10 21:49:43 +01:00
|
|
|
selectMyClaimsWithoutChannels,
|
2020-04-24 15:51:00 +02:00
|
|
|
doCheckPublishNameAvailability,
|
2020-02-06 19:49:05 +01:00
|
|
|
} from 'lbry-redux';
|
2020-06-12 22:44:25 +02:00
|
|
|
import { doToast } from 'redux/actions/notifications';
|
2020-02-06 19:49:05 +01:00
|
|
|
import ModalRepost from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
channels: selectMyChannelClaims(state),
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
title: makeSelectTitleForUri(props.uri)(state),
|
|
|
|
balance: selectBalance(state),
|
|
|
|
error: selectRepostError(state),
|
|
|
|
reposting: selectRepostLoading(state),
|
2020-02-10 21:49:43 +01:00
|
|
|
myClaims: selectMyClaimsWithoutChannels(state),
|
2020-02-06 19:49:05 +01:00
|
|
|
});
|
|
|
|
|
2020-04-24 15:51:00 +02:00
|
|
|
export default connect(select, {
|
|
|
|
doHideModal,
|
|
|
|
doRepost,
|
|
|
|
doClearRepostError,
|
|
|
|
doToast,
|
|
|
|
doCheckPublishNameAvailability,
|
|
|
|
})(ModalRepost);
|