lbry-desktop/ui/page/invited/index.js
jessop f130fae214 fix shortUrl subscriptions
refactor invited page
check if subscribed first
always follow regardless of reward status
2020-01-14 12:42:57 -05:00

24 lines
623 B
JavaScript

import { connect } from 'react-redux';
import InvitedPage from './view';
import { makeSelectPermanentUrlForUri } from 'lbry-redux';
import { withRouter } from 'react-router';
const select = (state, props) => {
const { match } = props;
const { params } = match;
const { referrer } = params;
const sanitizedReferrer = referrer ? referrer.replace(':', '#') : '';
const uri = `lbry://${sanitizedReferrer}`;
return {
fullUri: makeSelectPermanentUrlForUri(uri)(state),
referrer: referrer,
};
};
const perform = () => ({});
export default withRouter(
connect(
select,
perform
)(InvitedPage)
);