mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
defining class attribute instead of using component name
This commit is contained in:
@@ -51,7 +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) {
|
||||
if (child.displayName === PageActions.displayName) {
|
||||
pageActions = (
|
||||
<div
|
||||
className={classNames(
|
||||
@@ -97,7 +97,7 @@ class Page extends React.Component<Props> {
|
||||
let content = [];
|
||||
React.Children.forEach(children, child => {
|
||||
if (child) {
|
||||
if (child.type.name !== PageActions.name) {
|
||||
if (child.displayName !== PageActions.displayName) {
|
||||
content.push(child);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@ type Props = {
|
||||
children: React.Node
|
||||
};
|
||||
|
||||
class PageActions extends React.Component<Props> {
|
||||
export default class PageActions extends React.Component<Props> {
|
||||
displayName: string = "PageActions";
|
||||
|
||||
render() {
|
||||
return <>{this.renderContent()}</>;
|
||||
}
|
||||
@@ -24,5 +26,3 @@ class PageActions extends React.Component<Props> {
|
||||
return children;
|
||||
}
|
||||
}
|
||||
|
||||
export default PageActions;
|
||||
|
||||
Reference in New Issue
Block a user