Web.Common: Layout: fixed render ProfileActions component after changing language

This commit is contained in:
Daniil Senkiv 2020-01-22 18:03:04 +03:00
parent 7a43461e7a
commit d4e083cfaa
3 changed files with 6 additions and 6 deletions

View File

@ -35,8 +35,8 @@ class Layout extends React.Component {
hash += props.currentModuleId;
}
if (props.currentUser) {
const { id, displayName, email, avatarSmall } = props.currentUser;
hash += id + displayName + email + avatarSmall;
const { id, displayName, email, avatarSmall, cultureName } = props.currentUser;
hash += id + displayName + email + avatarSmall + cultureName;
}
if (props.availableModules) {
for (let i = 0, l = props.availableModules.length; i < l; i++) {

View File

@ -12,8 +12,7 @@ class ProfileActions extends React.PureComponent {
this.state = {
opened: props.opened,
user: props.user,
userActions: props.userActions
user: props.user
};
this.handleClick = this.handleClick.bind(this);
@ -95,7 +94,7 @@ class ProfileActions extends React.PureComponent {
displayName={this.state.user.displayName}
email={this.state.user.email}
/>
{this.state.userActions.map(action => (
{this.props.userActions.map(action => (
<Link
noHover={true}
key={action.key}

View File

@ -6,7 +6,8 @@ import Layout from "../Layout";
class PureStudioLayout extends React.Component {
shouldComponentUpdate(nextProps) {
return this.props.hasChanges !== nextProps.hasChanges ||
this.props.currentModuleId !== nextProps.currentModuleId;
this.props.currentModuleId !== nextProps.currentModuleId ||
this.props.language !== nextProps.language;
}
onProfileClick = () => {