mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 09:46:16 +01:00
added error check so that the search and create button are not displayed when users are logged out
This commit is contained in:
@@ -78,12 +78,12 @@ class Page extends React.Component<Props, State> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderPageHeader() {
|
renderPageHeader() {
|
||||||
const { title, subtitle, children, classes, t } = this.props;
|
const { error, title, subtitle, children, classes, t } = this.props;
|
||||||
|
|
||||||
let pageActions = null;
|
let pageActions = null;
|
||||||
let pageActionsExists = false;
|
let pageActionsExists = false;
|
||||||
React.Children.forEach(children, child => {
|
React.Children.forEach(children, child => {
|
||||||
if (child && child.type.name === PageActions.name) {
|
if (child && child.type.name === PageActions.name && !error) {
|
||||||
pageActions = (
|
pageActions = (
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
|
|||||||
Reference in New Issue
Block a user