added error check so that the search and create button are not displayed when users are logged out

This commit is contained in:
Florian Scholdei
2019-04-17 12:07:43 +02:00
parent bc3d9388e6
commit 1e845afd84

View File

@@ -78,12 +78,12 @@ class Page extends React.Component<Props, State> {
}
renderPageHeader() {
const { title, subtitle, children, classes, t } = this.props;
const { error, title, subtitle, children, classes, t } = this.props;
let pageActions = null;
let pageActionsExists = false;
React.Children.forEach(children, child => {
if (child && child.type.name === PageActions.name) {
if (child && child.type.name === PageActions.name && !error) {
pageActions = (
<div
className={classNames(