0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-29 04:42:41 +00:00

Further simplification of code.

This commit is contained in:
Sean Robertson
2021-07-28 16:04:28 +12:00
parent fa5bd92406
commit 6238ed6b77

View File

@@ -79,21 +79,6 @@ const SharePage = createClass({
</div>;
},
renderPrint : function(){
if(!this.props.brew.shareId) return;
return <PrintLink shareId={this.processShareId()} />;
},
renderSourceDropdown : function(){
if(!this.props.brew.shareId) return;
return <Nav.item icon='fas fa-code' color='red' className='source'
onMouseEnter={()=>this.handleDropdown(true)}
onMouseLeave={()=>this.handleDropdown(false)}>
source
{this.renderDropdown()}
</Nav.item>;
},
render : function(){
return <div className='sharePage sitePage'>
<Meta name='robots' content='noindex, nofollow' />
@@ -103,8 +88,13 @@ const SharePage = createClass({
</Nav.section>
<Nav.section>
{this.renderPrint()}
{this.renderSourceDropdown()}
{this.props.shareId && <PrintLink shareId={this.processShareId()} />
<Nav.item icon='fas fa-code' color='red' className='source'
onMouseEnter={()=>this.handleDropdown(true)}
onMouseLeave={()=>this.handleDropdown(false)}>
source
{this.renderDropdown()}
</Nav.item>}
<RecentNavItem brew={this.props.brew} storageKey='view' />
<Account />
</Nav.section>