Web.Common: Layout: fixed render ProfileActions component after changing language
This commit is contained in:
parent
7a43461e7a
commit
d4e083cfaa
@ -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++) {
|
||||
|
@ -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}
|
||||
|
@ -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 = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user