0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 22:52:40 +00:00

Cut out the renderPrivateBrews script

This commit is contained in:
Trevor Buckner
2020-02-06 21:15:21 -05:00
parent b3376435b9
commit 6d38a633ef
2 changed files with 8 additions and 15 deletions

View File

@@ -44,15 +44,6 @@ const UserPage = createClass({
render : function(){
const brews = this.getSortedBrews();
const publishedBrews =
<h1>{this.props.username}&rsquo;s brews</h1>
{this.renderBrews(brews.published)};
let privateBrews = '';
if(privateBrews && privateBrews.length) {
privateBrews =
<h1>{this.props.username}&rsquo;s unpublished brews</h1>
{this.renderBrews(brews.private)};
}
return <div className='userPage page'>
<Navbar>
@@ -64,11 +55,13 @@ const UserPage = createClass({
<div className='content'>
<div className='phb'>
<div className='published'>
{publishedBrews}
<div>
<h1>{this.props.username}'s brews</h1>
{this.renderBrews(brews.published)}
</div>
<div className='private'>
{privateBrews}
<div>
<h1>{this.props.username}'s unpublished brews</h1>
{this.renderBrews(brews.private)}
</div>
</div>
</div>

View File

@@ -17,7 +17,7 @@
.phb{
.noColumns();
height : auto;
min-height : 279.4mm;
min-height : 279.4mm;
margin : 20px auto;
&::after{
display : none;
@@ -30,4 +30,4 @@
}
}
}
}