Skip to content

Commit d1f49b8

Browse files
committed
fix: on Account Address screen
1 parent 1ebbb92 commit d1f49b8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/components/account/AddAccountAddress.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class AddAccountAddress extends Component {
122122

123123
renderRegions = () => {
124124
const theme = this.context;
125-
const { countryId, countries } = this.props;
125+
const { countryId, countries, region } = this.props;
126126
if (countryId && countryId.length && countries && countries.length) {
127127
const country = countries.find(item => item.id === countryId);
128128
if (country && country.available_regions) {
@@ -131,11 +131,15 @@ class AddAccountAddress extends Component {
131131
key: value.id,
132132
}));
133133

134+
const label = region?.region
135+
? region?.region
136+
: translate('common.region');
137+
134138
return (
135139
<ModalSelect
136140
disabled={data.length === 0}
137141
key="regions"
138-
label={translate('common.region')}
142+
label={label}
139143
attribute="Region"
140144
value="Region"
141145
data={data}

src/components/common/ModalSelect.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ const ModalSelect = ({ data, disabled, label, onChange, attribute, style }) => {
88
const [value, setValue] = useState('');
99

1010
const _onChange = option => {
11-
setValue(
12-
attribute === 'CurrencyCode'
13-
? option.label
14-
: `${label} : ${option.label}`,
15-
);
11+
setValue(option.label);
1612

1713
if (onChange) {
1814
onChange(attribute, option.key);

0 commit comments

Comments
 (0)