RelatedResources: drop renderTitle()
authorPhilippe Pepiot <philippe.pepiot@logilab.fr>
Tue, 30 May 2017 16:34:30 +0200
changeset 219 b53a022e0c51
parent 218 b1eb36b816da
child 220 44873bd54b07
RelatedResources: drop renderTitle() Since the function is only used once
src/components/Entity.js
--- a/src/components/Entity.js	Tue May 30 16:31:37 2017 +0200
+++ b/src/components/Entity.js	Tue May 30 16:34:30 2017 +0200
@@ -79,16 +79,6 @@
 
     }
 
-    function renderTitle() {
-        return (
-            <div>
-                { props.title }
-                { renderActions() }
-                <div className="clearfix" />
-            </div>
-        );
-    }
-
     function renderRelated() {
         if (props.resource === null) {
             return (
@@ -111,7 +101,9 @@
         <div className="panel panel-default">
             <div className="panel-heading">
                 <div className="panel-title">
-                    { renderTitle() }
+                    { props.title }
+                    { renderActions() }
+                    <div className="clearfix" />
                 </div>
             </div>
             { renderRelated() }