Skip to content

Commit 19cee27

Browse files
Merge pull request #5606 from topcoder-platform/fix-country-setting-page
Fix country setting page
2 parents 69fb08a + 0e45664 commit 19cee27

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ workflows:
348348
branches:
349349
only:
350350
- free
351+
- fix-country-setting-page
351352
# This is alternate dev env for parallel testing
352353
- "build-qa":
353354
context : org-global
@@ -368,7 +369,7 @@ workflows:
368369
filters: &filters-staging
369370
branches:
370371
only:
371-
- fix-env-value-issuer
372+
- develop
372373
# Production builds are exectuted
373374
# when PR is merged to the master
374375
# Don't change anything in this configuration

src/shared/components/Settings/Profile/BasicInfo/index.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ export default class BasicInfo extends ConsentComponent {
9595
inputChanged: false,
9696
});
9797
}
98+
if (nextProps.lookupData) {
99+
const { countries } = nextProps.lookupData;
100+
const { newBasicInfo } = this.state;
101+
if (!newBasicInfo.country) {
102+
const code = newBasicInfo.homeCountryCode || newBasicInfo.competitionCountryCode;
103+
const { country } = countries.find(c => c.countryCode === code) || {};
104+
newBasicInfo.country = country;
105+
this.setState({ newBasicInfo });
106+
}
107+
}
98108
}
99109

100110
onCheckFormValue(newBasicInfo) {

0 commit comments

Comments
 (0)