mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-18 05:42:48 +00:00
Added in a brew item component
This commit is contained in:
@@ -5,6 +5,8 @@ const cx = require('classnames');
|
||||
const Nav = require('naturalcrit/nav/nav.jsx');
|
||||
const Navbar = require('../../navbar/navbar.jsx');
|
||||
|
||||
const BrewItem = require('./brewItem/brewItem.jsx');
|
||||
|
||||
const UserPage = React.createClass({
|
||||
getDefaultProps: function() {
|
||||
return {
|
||||
@@ -13,6 +15,12 @@ const UserPage = React.createClass({
|
||||
};
|
||||
},
|
||||
|
||||
renderBrews : function(){
|
||||
return _.map(this.props.brews, (brew) => {
|
||||
return <BrewItem brew={brew} />
|
||||
});
|
||||
},
|
||||
|
||||
render : function(){
|
||||
console.log(this.props.brews);
|
||||
|
||||
@@ -26,6 +34,7 @@ const UserPage = React.createClass({
|
||||
<div className='content'>
|
||||
<div className='phb'>
|
||||
<h1>{this.props.username}</h1>
|
||||
{this.renderBrews()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user