web: People: Added handler on Layout onLogoClick function

This commit is contained in:
Alexey Safronov 2019-07-20 21:00:51 +03:00
parent 645946d7f1
commit 418ea538d1

View File

@ -25,14 +25,13 @@ const PeopleLayout = props => {
},
];
const newProps = auth.isAuthenticated && auth.isLoaded
? { currentUserActions: currentUserActions,
onLogoClick: () => window.open("/", '_self'),
...props }
: {};
const layoutProps = { currentUserActions: currentUserActions, ...props };
return (
auth.isAuthenticated && auth.isLoaded
? <Layout key="1" {...layoutProps}>{children}</Layout>
: <Layout key="2">{children}</Layout>
);
return (<Layout key="1" {...newProps}>{children}</Layout>);
};
PeopleLayout.propTypes = {
@ -48,7 +47,7 @@ function convertModules(modules) {
iconName: 'ChatIcon',
notifications: 3,
url: '/products/chat/',
onClick: () => window.open('/products/chat/', '_blank'),
onClick: () => window.open('/products/chat/', '_self'),
onBadgeClick: e => console.log('ChatIconBadge Clicked')(e),
isolateMode: true
};