diff --git a/ui/component/claimSupportButton/index.js b/ui/component/claimSupportButton/index.js index 6327c125a..375d59452 100644 --- a/ui/component/claimSupportButton/index.js +++ b/ui/component/claimSupportButton/index.js @@ -2,6 +2,8 @@ import { connect } from 'react-redux'; import { doOpenModal } from 'redux/actions/app'; import { makeSelectTagInClaimOrChannelForUri, selectClaimForUri } from 'redux/selectors/claims'; import ClaimSupportButton from './view'; +import { selectClientSetting } from 'redux/selectors/settings'; +import * as SETTINGS from 'constants/settings'; const DISABLE_SUPPORT_TAG = 'disable-support'; @@ -14,6 +16,7 @@ const select = (state, props) => { return { disableSupport: makeSelectTagInClaimOrChannelForUri(uri, DISABLE_SUPPORT_TAG)(state), isRepost, + preferredCurrency: selectClientSetting(state, SETTINGS.PREFERRED_CURRENCY), }; }; diff --git a/ui/component/claimSupportButton/view.jsx b/ui/component/claimSupportButton/view.jsx index db8c592e7..fef4cd0ab 100644 --- a/ui/component/claimSupportButton/view.jsx +++ b/ui/component/claimSupportButton/view.jsx @@ -13,18 +13,32 @@ type Props = { disableSupport: boolean, isRepost?: boolean, doOpenModal: (id: string, {}) => void, + preferredCurrency: ?string, }; export default function ClaimSupportButton(props: Props) { - const { uri, fileAction, isRepost, disableSupport, doOpenModal } = props; + const { uri, fileAction, isRepost, disableSupport, doOpenModal, preferredCurrency } = props; + + const currencyToUse = preferredCurrency; + + const iconToUse = { + EUR: { + icon: ICONS.EURO, + iconSize: 16, + }, + USD: { + icon: ICONS.FINANCE, + iconSize: fileAction ? 22 : undefined, + }, + }; return disableSupport ? null : (