lbry-desktop/ui/component/socialShare/index.js

20 lines
931 B
JavaScript
Raw Normal View History

2018-09-12 18:42:15 +02:00
import { connect } from 'react-redux';
import { makeSelectClaimForUri, makeSelectTitleForUri } from 'redux/selectors/claims';
2018-09-12 18:42:15 +02:00
import SocialShare from './view';
import { selectUserInviteReferralCode, selectUser } from 'redux/selectors/user';
import { makeSelectContentPositionForUri } from 'redux/selectors/content';
2021-10-22 04:41:45 +02:00
import { makeSelectClientSetting } from 'redux/selectors/settings';
import * as SETTINGS from 'constants/settings';
2018-09-12 18:42:15 +02:00
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
2020-01-14 21:44:07 +01:00
referralCode: selectUserInviteReferralCode(state),
user: selectUser(state),
2020-03-30 21:43:27 +02:00
title: makeSelectTitleForUri(props.uri)(state),
position: makeSelectContentPositionForUri(props.uri)(state),
2021-10-22 04:41:45 +02:00
customShareUrlEnabled: makeSelectClientSetting(SETTINGS.CUSTOM_SHARE_URL_ENABLED)(state),
customShareUrl: makeSelectClientSetting(SETTINGS.CUSTOM_SHARE_URL)(state),
2018-09-12 18:42:15 +02:00
});
export default connect(select)(SocialShare);