Web: People: Fixed displaying not found language in combobox
This commit is contained in:
parent
19d72f2fe8
commit
a54a735cfa
@ -86,23 +86,13 @@ const IconButtonWrapper = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
const capitalizeFirstLetter = (string) => {
|
||||
return string && string.charAt(0).toUpperCase() + string.slice(1);
|
||||
};
|
||||
|
||||
class ProfileInfo extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = this.mapPropsToState(props);
|
||||
}
|
||||
|
||||
mapPropsToState = (props) => {
|
||||
const newState = {
|
||||
this.state = {
|
||||
profile: props.profile,
|
||||
};
|
||||
|
||||
return newState;
|
||||
};
|
||||
}
|
||||
|
||||
onGroupClick = (e) => {
|
||||
const group = e.currentTarget.dataset.id;
|
||||
@ -196,7 +186,9 @@ class ProfileInfo extends React.PureComponent {
|
||||
const type = isVisitor ? guestCaption : userCaption;
|
||||
const language = cultureName || currentCulture || this.props.culture;
|
||||
const languages = this.getLanguages();
|
||||
const selectedLanguage = languages.find((item) => item.key === language);
|
||||
const selectedLanguage =
|
||||
languages.find((item) => item.key === language) ||
|
||||
languages.find((item) => item.key === this.props.culture);
|
||||
const workFromDate = new Date(workFrom).toLocaleDateString(language);
|
||||
const birthDayDate = new Date(birthday).toLocaleDateString(language);
|
||||
const formatedSex =
|
||||
|
Loading…
Reference in New Issue
Block a user