lbry-desktop/ui/modal/modalRepost/index.js

35 lines
887 B
JavaScript
Raw Normal View History

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,
doToast,
2020-02-10 21:49:43 +01:00
selectMyClaimsWithoutChannels,
doCheckPublishNameAvailability,
2020-02-06 19:49:05 +01:00
} from 'lbry-redux';
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
});
export default connect(select, {
doHideModal,
doRepost,
doClearRepostError,
doToast,
doCheckPublishNameAvailability,
})(ModalRepost);