Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(props) {
super(props);
this.state = {
windowLevelData: cloneDeep(props.windowLevelData),
hotKeysData: cloneDeep(props.hotKeysData),
generalData: {
currentLanguage: i18n.language.substring(0, 2),
// TODO: list of available languages should come from i18n.options.resources
languages: [
{
value: 'en',
label: 'English',
},
{
value: 'es',
label: 'Spanish',
},
],
onChange: language => {
this.changeLanguage(language);
},
},
};
const getCurrentLanguage = (language = i18n.language) =>
language.split('-')[0];
const getCurrentLanguage = (language = i18n.language) =>
language.split('-')[0];