lbry-desktop/ui/component/socialShare/index.js

22 lines
842 B
JavaScript
Raw Normal View History

2018-09-12 18:42:15 +02:00
import { connect } from 'react-redux';
import { doFetchInviteStatus } from 'redux/actions/user';
import { makeSelectClaimForUri, selectTitleForUri } from 'redux/selectors/claims';
2018-09-12 18:42:15 +02:00
import SocialShare from './view';
import { selectUserInviteReferralCode, selectUser, selectUserInviteStatusFetched } from 'redux/selectors/user';
import { makeSelectContentPositionForUri } from 'redux/selectors/content';
2018-09-12 18:42:15 +02:00
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
inviteStatusFetched: selectUserInviteStatusFetched(state),
2020-01-14 21:44:07 +01:00
referralCode: selectUserInviteReferralCode(state),
user: selectUser(state),
title: selectTitleForUri(state, props.uri),
position: makeSelectContentPositionForUri(props.uri)(state),
2018-09-12 18:42:15 +02:00
});
const perform = {
doFetchInviteStatus,
};
export default connect(select, perform)(SocialShare);