Skip to content

Commit 36fce9e

Browse files
Merge pull request #5591 from gets0ul/fix-issue_5501-country
issue #5501 fix: member country is not displayed in settings
2 parents bd1ad7a + 753a4b5 commit 36fce9e

File tree

1 file changed

+10
-0
lines changed
  • src/shared/components/Settings/Profile/BasicInfo

1 file changed

+10
-0
lines changed

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)