now displaying traits on item details page
This commit is contained in:
27
front-ui/app/components/items/traits.js
Normal file
27
front-ui/app/components/items/traits.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var React = require('react');
|
||||
|
||||
var Traits = React.createClass({
|
||||
render: function() {
|
||||
|
||||
var traitsPresentation = [];
|
||||
var traits = (this.props.traits || {});
|
||||
for(var traitKey in traits ) {
|
||||
if(traits.hasOwnProperty(traitKey)) {
|
||||
var traitValue = this.props.traits[traitKey];
|
||||
traitsPresentation.push( <div className="single_trait">{traitKey}: {traitValue}</div> );
|
||||
}
|
||||
}
|
||||
|
||||
console.log(traitsPresentation);
|
||||
return (
|
||||
<div className="row-fluid">
|
||||
<div className="span12">
|
||||
{traitsPresentation}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
module.exports = Traits;
|
||||
Reference in New Issue
Block a user