mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +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:
@@ -32,7 +32,7 @@ class OverviewPageActions extends React.Component<Props> {
|
||||
const { history, location, link } = this.props;
|
||||
let directory = link.substring(0, link.indexOf("/"));
|
||||
return (
|
||||
<PageActions>
|
||||
<>
|
||||
<FilterInput
|
||||
value={urls.getQueryStringFromLocation(location)}
|
||||
filter={filter => {
|
||||
@@ -40,7 +40,7 @@ class OverviewPageActions extends React.Component<Props> {
|
||||
}}
|
||||
/>
|
||||
{this.renderCreateButton()}
|
||||
</PageActions>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -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