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

26 lines
860 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';
2022-05-13 14:04:26 +02:00
import { selectClaimForUri, 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 { selectContentPositionForUri } from 'redux/selectors/content';
2018-09-12 18:42:15 +02:00
2022-05-13 14:04:26 +02:00
const select = (state, props) => {
const { uri } = props;
return {
claim: selectClaimForUri(state, uri),
2022-05-13 14:04:26 +02:00
inviteStatusFetched: selectUserInviteStatusFetched(state),
referralCode: selectUserInviteReferralCode(state),
user: selectUser(state),
title: selectTitleForUri(state, uri),
position: selectContentPositionForUri(state, uri),
};
};
2018-09-12 18:42:15 +02:00
const perform = {
doFetchInviteStatus,
};
export default connect(select, perform)(SocialShare);