Rename RelatedEntities to RelatedResources
authorFrank Bessou <frank.bessou@logilab.fr>
Fri, 28 Apr 2017 15:25:56 +0200
changeset 156 7989ac4a50d3
parent 155 12900847264e
child 157 7e86687bd6f7
Rename RelatedEntities to RelatedResources
src/components/Entity.js
--- a/src/components/Entity.js	Fri Apr 28 15:24:59 2017 +0200
+++ b/src/components/Entity.js	Fri Apr 28 15:25:56 2017 +0200
@@ -76,7 +76,7 @@
     data: PropTypeJsonaryWrapper.isRequired,
 };
 
-export class RelatedEntities extends React.Component {
+export class RelatedResources extends React.Component {
     // XXX This is very similar to Entities component...
     constructor(props) {
         super(props);
@@ -90,7 +90,7 @@
         HypermediaClient.getResource(this.state.link.href)
             .then(entities => this.setState({related: entities}))
             .catch(error => {
-                console.error(`error on RelatedEntities  ${error}`);
+                console.error(`error on RelatedResources  ${error}`);
             });
     }
 
@@ -144,7 +144,7 @@
     }
 }
 
-RelatedEntities.propTypes = {
+RelatedResources.propTypes = {
     link: PropTypes.object.isRequired,
 };
 
@@ -288,7 +288,7 @@
         const links = this.props.entity.data.links('related');
         if (links.length > 0) {
             return Array.prototype.map.call(links, (link) => {
-                return <RelatedEntities key={link.title} link={link} />
+                return <RelatedResources key={link.title} link={link} />
             });
         }
         return null;