mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-15 14:52:39 +00:00
Further simplification of code.
This commit is contained in:
@@ -79,21 +79,6 @@ const SharePage = createClass({
|
|||||||
</div>;
|
</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(){
|
render : function(){
|
||||||
return <div className='sharePage sitePage'>
|
return <div className='sharePage sitePage'>
|
||||||
<Meta name='robots' content='noindex, nofollow' />
|
<Meta name='robots' content='noindex, nofollow' />
|
||||||
@@ -103,8 +88,13 @@ const SharePage = createClass({
|
|||||||
</Nav.section>
|
</Nav.section>
|
||||||
|
|
||||||
<Nav.section>
|
<Nav.section>
|
||||||
{this.renderPrint()}
|
{this.props.shareId && <PrintLink shareId={this.processShareId()} />
|
||||||
{this.renderSourceDropdown()}
|
<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' />
|
<RecentNavItem brew={this.props.brew} storageKey='view' />
|
||||||
<Account />
|
<Account />
|
||||||
</Nav.section>
|
</Nav.section>
|
||||||
|
|||||||
Reference in New Issue
Block a user