fix some flow errors and other pointers

This commit is contained in:
Anthony 2022-03-29 17:11:37 +02:00 committed by Thomas Zarebczan
parent d70c489163
commit beaf425068
2 changed files with 6 additions and 4 deletions

View file

@ -34,7 +34,7 @@ type Props = {
setConvertedAmount?: (number) => void, setConvertedAmount?: (number) => void,
setDisableSubmitButton: (boolean) => void, setDisableSubmitButton: (boolean) => void,
setTipError: (any) => void, setTipError: (any) => void,
preferredCurrency?: boolean, preferredCurrency: string,
}; };
function WalletTipAmountSelector(props: Props) { function WalletTipAmountSelector(props: Props) {

View file

@ -27,9 +27,12 @@ type Props = {
email: ?string, email: ?string,
scriptFailedToLoad: boolean, scriptFailedToLoad: boolean,
doOpenModal: (string, {}) => void, doOpenModal: (string, {}) => void,
doToast: ({}) => void,
openModal: (string, {}) => void, openModal: (string, {}) => void,
setAsConfirmingCard: () => void, setAsConfirmingCard: () => void,
locale: ?any, locale: ?any,
preferredCurrency: string,
setPreferredCurrency: (string) => void,
}; };
// type State = { // type State = {
@ -368,7 +371,7 @@ class SettingsStripeCard extends React.Component<Props, State> {
render() { render() {
let that = this; let that = this;
const returnToValue = new URLSearchParams(this.props.location.search).get('returnTo'); const returnToValue = new URLSearchParams(location.search).get('returnTo');
let shouldShowBackToMembershipButton = returnToValue === 'premium'; let shouldShowBackToMembershipButton = returnToValue === 'premium';
function setAsConfirmingCard() { function setAsConfirmingCard() {
@ -482,7 +485,7 @@ class SettingsStripeCard extends React.Component<Props, State> {
<br /> <br />
<div className="currency-to-use-div"> <div className="currency-to-use-div">
<h1 className="currency-to-use-header">Currency To Use:</h1> <h1 className="currency-to-use-header">{__('Currency To Use')}:</h1>
<fieldset-section> <fieldset-section>
<FormField <FormField
@ -491,7 +494,6 @@ class SettingsStripeCard extends React.Component<Props, State> {
type="select" type="select"
onChange={onCurrencyChange} onChange={onCurrencyChange}
value={preferredCurrency} value={preferredCurrency}
// disabled={automaticDarkModeEnabled}
> >
{['USD', 'EUR'].map((currency) => ( {['USD', 'EUR'].map((currency) => (
<option key={currency} value={currency}> <option key={currency} value={currency}>