mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-25 05:22:38 +00:00
Shift check to presence of this.props.brew.shareId. Revert changes to Homebrew.jsx.
This commit is contained in:
@@ -48,7 +48,7 @@ const Homebrew = createClass({
|
||||
<Route path='/user/:username' component={(routeProps)=><UserPage username={routeProps.match.params.username} brews={this.props.brews} />}/>
|
||||
<Route path='/print/:id' component={(routeProps)=><PrintPage brew={this.props.brew} query={queryString.parse(routeProps.location.search)} /> } />
|
||||
<Route path='/print' exact component={(routeProps)=><PrintPage query={queryString.parse(routeProps.location.search)} /> } />
|
||||
<Route path='/changelog' exact component={()=><SharePage brew={{ title: 'Changelog', text: this.props.changelog }} showSource=false showPrint=false />}/>
|
||||
<Route path='/changelog' exact component={()=><SharePage brew={{ title: 'Changelog', text: this.props.changelog }} />}/>
|
||||
<Route path='/' component={()=><HomePage welcomeText={this.props.welcomeText}/>}/>
|
||||
</Switch>
|
||||
</div>
|
||||
|
||||
@@ -25,9 +25,7 @@ const SharePage = createClass({
|
||||
updatedAt : null,
|
||||
views : 0,
|
||||
renderer : ''
|
||||
},
|
||||
showSource : true,
|
||||
showPrint : true
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
@@ -82,12 +80,12 @@ const SharePage = createClass({
|
||||
},
|
||||
|
||||
renderPrint : function(){
|
||||
if(!this.state.showPrint) return;
|
||||
if(!this.props.brew.shareId) return;
|
||||
return <PrintLink shareId={this.processShareId()} />;
|
||||
},
|
||||
|
||||
renderSourceDropdown : function(){
|
||||
if(!this.state.showSource) return;
|
||||
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)}>
|
||||
|
||||
Reference in New Issue
Block a user