defining class attribute instead of using component name

This commit is contained in:
Florian Scholdei
2019-07-24 17:30:40 +02:00
parent bb9b44e1f9
commit 953f0c7000
2 changed files with 5 additions and 5 deletions

View File

@@ -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);
}
}