Removing unnecessary constructor
This commit is contained in:
parent
03ef9b2203
commit
d3a0746ebb
@ -22,12 +22,8 @@ const localeToAvailable = (locale, available, defaultLocale) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
class LocaleSwitcher extends React.PureComponent {
|
class LocaleSwitcher extends React.PureComponent {
|
||||||
constructor() {
|
state = {
|
||||||
super();
|
current: localeToAvailable(i18n.language || '', Object.keys(locales), 'en')
|
||||||
|
|
||||||
this.state = {
|
|
||||||
current: localeToAvailable(i18n.language || '', Object.keys(locales), 'en')
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
localeSelector = React.createRef()
|
localeSelector = React.createRef()
|
||||||
|
Loading…
Reference in New Issue
Block a user