2020-01-14 21:44:07 +01:00
|
|
|
import { connect } from 'react-redux';
|
|
|
|
import InvitedPage from './view';
|
2021-11-17 12:57:04 +01:00
|
|
|
import { selectPermanentUrlForUri } from 'redux/selectors/claims';
|
2020-01-14 21:44:07 +01:00
|
|
|
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 {
|
2021-11-17 12:57:04 +01:00
|
|
|
fullUri: selectPermanentUrlForUri(state, uri),
|
2020-01-14 21:44:07 +01:00
|
|
|
referrer: referrer,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
const perform = () => ({});
|
|
|
|
|
2021-10-17 10:36:14 +02:00
|
|
|
export default withRouter(connect(select, perform)(InvitedPage));
|