7fc66aecb6
## Issue Closes 385 ## Approach As mentioned in the ticket, the current places where that info is needed is in the Invites Page and Social Share Component. 1. Invites Page: it is already doing the fetch on mount, so no issue there. 2. Social Share: show spinner until the data is fetched.
21 lines
842 B
JavaScript
21 lines
842 B
JavaScript
import { connect } from 'react-redux';
|
|
import { doFetchInviteStatus } from 'redux/actions/user';
|
|
import { makeSelectClaimForUri, selectTitleForUri } from 'redux/selectors/claims';
|
|
import SocialShare from './view';
|
|
import { selectUserInviteReferralCode, selectUser, selectUserInviteStatusFetched } from 'redux/selectors/user';
|
|
import { makeSelectContentPositionForUri } from 'redux/selectors/content';
|
|
|
|
const select = (state, props) => ({
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
inviteStatusFetched: selectUserInviteStatusFetched(state),
|
|
referralCode: selectUserInviteReferralCode(state),
|
|
user: selectUser(state),
|
|
title: selectTitleForUri(state, props.uri),
|
|
position: makeSelectContentPositionForUri(props.uri)(state),
|
|
});
|
|
|
|
const perform = {
|
|
doFetchInviteStatus,
|
|
};
|
|
|
|
export default connect(select, perform)(SocialShare);
|