mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-23 20:56:54 +00:00
basic changes
This commit is contained in:
1 parent
7222d28773
commit
208ac4046f
3 files changed
+80
-61
No files matched your search
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
|
||||
import Nav from './nav.jsx';
|
||||
import { printCurrentBrew } from '@shared/helpers.js';
|
||||
|
||||
export default function(){
|
||||
export default function({disabled}){
|
||||
const [printing, setPrinting] = useState(false);
|
||||
|
||||
// listen for print cycle events to display "loading" message since it can take some time.
|
||||
@@ -19,7 +19,7 @@ export default function(){
|
||||
|
||||
const handlePrintPrepFinished = ()=>{ setPrinting(false); };
|
||||
|
||||
return <Nav.item onClick={printCurrentBrew} color='purple' icon='far fa-file-pdf'>
|
||||
return <Nav.item onClick={printCurrentBrew} color='purple' icon='far fa-file-pdf' disabled={disabled}>
|
||||
{printing ? 'loading' : 'get PDF'}
|
||||
</Nav.item>;
|
||||
};
|
||||
Reference in new issue
Block a user