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