lbry-desktop/ui/component/preorderButton/index.js
mayeaux 4f47779303
Preorder content functionality (#1743)
* adding preorder button

* adding preorder modal

* frontend mostly done

* check if its already purchased

* refresh page after purchase

* smooth out purchase process

* check if user has card saved

* handle case where its the users own upload

* fix transaction listing order bug

* cleaning up code for merge

* fix lint errors

* fix flow errors

* allow eur purchases

* support eur on customer transaction page

* fix css
2022-06-23 20:58:32 -04:00

23 lines
724 B
JavaScript

import { connect } from 'react-redux';
import { selectPreorderTag, selectClaimForUri, selectClaimIsMine } from 'redux/selectors/claims';
import ClaimTags from './view';
import { doOpenModal } from 'redux/actions/app';
import * as SETTINGS from 'constants/settings';
import { selectClientSetting } from 'redux/selectors/settings';
const select = (state, props) => {
const claim = selectClaimForUri(state, props.uri);
return {
preorderTag: selectPreorderTag(state, props.uri),
claimIsMine: selectClaimIsMine(state, claim),
claim,
preferredCurrency: selectClientSetting(state, SETTINGS.PREFERRED_CURRENCY),
};
};
const perform = {
doOpenModal,
};
export default connect(select, perform)(ClaimTags);