Browse Source
Fix when removing selected currency in select
master
meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
11 additions and
1 deletions
-
src/components/modals/ImportAccounts/steps/01-step-choose-currency.js
|
|
@ -1,6 +1,7 @@ |
|
|
|
// @flow
|
|
|
|
|
|
|
|
import React, { Fragment } from 'react' |
|
|
|
import isArray from 'lodash/isArray' |
|
|
|
|
|
|
|
import SelectCurrency from 'components/SelectCurrency' |
|
|
|
import Button from 'components/base/Button' |
|
|
@ -9,7 +10,16 @@ import CurrencyBadge from 'components/base/CurrencyBadge' |
|
|
|
import type { StepProps } from '../index' |
|
|
|
|
|
|
|
function StepChooseCurrency({ currency, setState }: StepProps) { |
|
|
|
return <SelectCurrency onChange={currency => setState({ currency })} value={currency} /> |
|
|
|
return ( |
|
|
|
<SelectCurrency |
|
|
|
onChange={currency => { |
|
|
|
setState({ |
|
|
|
currency: isArray(currency) && currency.length === 0 ? null : currency, |
|
|
|
}) |
|
|
|
}} |
|
|
|
value={currency} |
|
|
|
/> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
export function StepChooseCurrencyFooter({ transitionTo, currency, t }: StepProps) { |
|
|
|