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