lbry-desktop/ui/component/preorderButton/index.js
mayeaux de068d36f1
Preorder button touchups (#1755)
* update precommit hook

* touchup code per kps comments
2022-06-24 09:08:46 -04:00

23 lines
746 B
JavaScript

import { connect } from 'react-redux';
import { selectPreorderTagForUri, selectClaimForUri, selectClaimIsMine } from 'redux/selectors/claims';
import PreorderButton 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: selectPreorderTagForUri(state, props.uri),
claimIsMine: selectClaimIsMine(state, claim),
claim,
preferredCurrency: selectClientSetting(state, SETTINGS.PREFERRED_CURRENCY),
};
};
const perform = {
doOpenModal,
};
export default connect(select, perform)(PreorderButton);