0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-10 17:52:47 +00:00

Fix Share links

This commit is contained in:
Trevor Buckner
2020-10-07 17:13:37 -04:00
parent 28ed2fe8f2
commit 8fe0148821
3 changed files with 37 additions and 16 deletions

View File

@@ -290,6 +290,12 @@ const EditPage = createClass({
}
},
processShareId : function() {
return this.state.brew.googleId ?
this.state.brew.googleId + this.state.brew.shareId :
this.state.brew.shareId;
},
renderNavbar : function(){
return <Navbar>
<Nav.section>
@@ -300,10 +306,10 @@ const EditPage = createClass({
{this.renderGoogleDriveIcon()}
{this.renderSaveButton()}
<ReportIssue />
<Nav.item newTab={true} href={`/share/${this.props.brew.shareId}`} color='teal' icon='fa-share-alt'>
<Nav.item newTab={true} href={`/share/${this.processShareId()}`} color='teal' icon='fa-share-alt'>
Share
</Nav.item>
<PrintLink shareId={this.props.brew.shareId} />
<PrintLink shareId={this.processShareId()} />
<RecentNavItem brew={this.props.brew} storageKey='edit' />
<Account />
</Nav.section>