mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-15 10:18:44 +00:00
Remove files changed from incorrect base
This commit is contained in:
@@ -2,12 +2,7 @@ import React, { useState, useEffect } from 'react';
|
||||
import Nav from './nav.jsx';
|
||||
import { printCurrentBrew } from '@shared/helpers.js';
|
||||
|
||||
const processShareId = (brew)=>{
|
||||
|
||||
return brew.googleId && !brew.stubbed ? brew.googleId + brew.shareId : brew.shareId;
|
||||
};
|
||||
|
||||
export default ({ currentBrew })=>{
|
||||
export default function(){
|
||||
const [printing, setPrinting] = useState(false);
|
||||
|
||||
// listen for print cycle events to display "loading" message since it can take some time.
|
||||
@@ -24,27 +19,7 @@ export default ({ currentBrew })=>{
|
||||
|
||||
const handlePrintPrepFinished = ()=>{ setPrinting(false); };
|
||||
|
||||
if(currentBrew?.shareId) return <Nav.dropdown>
|
||||
<Nav.item color='purple' icon='fas fa-code'>
|
||||
export
|
||||
</Nav.item>
|
||||
<Nav.item onClick={printCurrentBrew} color='purple' icon='far fa-file-pdf'>
|
||||
{printing ? 'loading' : 'get PDF'}
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' icon='fas fa-download' href={`/download/cm/${processShareId(currentBrew)}`}>
|
||||
Markdown
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' icon='fas fa-download' href={`/download/toml/${processShareId(currentBrew)}`}>
|
||||
Markdown (TOML)
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' icon='fas fa-download' href={`/download/json/${processShareId(currentBrew)}`}>
|
||||
Markdown (JSON)
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' icon='fas fa-download' href={`/download/hb/${processShareId(currentBrew)}`}>
|
||||
Markdown (Homebrewery)
|
||||
</Nav.item>
|
||||
</Nav.dropdown>;
|
||||
else return <Nav.item onClick={printCurrentBrew} color='purple' icon='far fa-file-pdf'>
|
||||
return <Nav.item onClick={printCurrentBrew} color='purple' icon='far fa-file-pdf'>
|
||||
{printing ? 'loading' : 'get PDF'}
|
||||
</Nav.item>;
|
||||
};
|
||||
|
||||
@@ -372,7 +372,7 @@ const EditorPage = (props)=>{
|
||||
{(pageName == 'editPage') && renderAutoSaveButton()}
|
||||
</Nav.dropdown>}
|
||||
<NewBrewItem />
|
||||
<PrintNavItem currentBrew={currentBrew}/>
|
||||
<PrintNavItem />
|
||||
<HelpNavItem />
|
||||
<VaultNavItem />
|
||||
{(pageName == 'editPage') && <ShareNavItem brew={currentBrew} currentPage={currentBrewRendererPageNum} />}
|
||||
|
||||
@@ -117,7 +117,7 @@ const SharePage = (props)=>{
|
||||
view
|
||||
</Nav.item>
|
||||
{renderEditLink()}
|
||||
<Nav.item color='blue' icon='fas fa-download' href={`/download/hb/${processShareId()}`}>
|
||||
<Nav.item color='blue' icon='fas fa-download' href={`/download/${processShareId()}`}>
|
||||
download
|
||||
</Nav.item>
|
||||
<Nav.item color='blue' icon='fas fa-clone' href={`/new/${processShareId()}`}>
|
||||
|
||||
Reference in New Issue
Block a user