mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 06:55:47 +01:00
pulled out PageActions from OverviewPageActions because otherwise you can not check for name of OverviewPageActions because the component exported injectSheet -> jss
simplified CreateUser/GroupButton by not being used as external component
This commit is contained in:
@@ -7,7 +7,6 @@ import ErrorNotification from "./../ErrorNotification";
|
||||
import Title from "./Title";
|
||||
import Subtitle from "./Subtitle";
|
||||
import PageActions from "./PageActions";
|
||||
import OverviewPageActions from "../OverviewPageActions";
|
||||
import ErrorBoundary from "../ErrorBoundary";
|
||||
|
||||
type Props = {
|
||||
@@ -52,10 +51,7 @@ class Page extends React.Component<Props> {
|
||||
let pageActionsExists = false;
|
||||
React.Children.forEach(children, child => {
|
||||
if (child && !error) {
|
||||
if (
|
||||
child.type.name === PageActions.name ||
|
||||
child.type.name === OverviewPageActions.name
|
||||
)
|
||||
if (child.type.name === PageActions.name)
|
||||
pageActions = (
|
||||
<div
|
||||
className={classNames(
|
||||
@@ -100,10 +96,7 @@ class Page extends React.Component<Props> {
|
||||
let content = [];
|
||||
React.Children.forEach(children, child => {
|
||||
if (child) {
|
||||
if (
|
||||
child.type.name !== PageActions.name &&
|
||||
child.type.name !== OverviewPageActions.name
|
||||
) {
|
||||
if (child.type.name !== PageActions.name) {
|
||||
content.push(child);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user