0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-09 20:12:41 +00:00

Rename printPage function to printCurrentBrew()

Avoid confusion with other "page" components.
This commit is contained in:
Trevor Buckner
2024-05-28 16:11:18 -04:00
parent 01d60c4520
commit 8a55658bd7
6 changed files with 12 additions and 12 deletions

View File

@@ -13,7 +13,7 @@ const RenderWarnings = require('homebrewery/renderWarnings/renderWarnings.jsx');
const NotificationPopup = require('./notificationPopup/notificationPopup.jsx');
const Frame = require('react-frame-component').default;
const dedent = require('dedent-tabs').default;
const { printPage } = require('../../../shared/helpers.js');
const { printCurrentBrew } = require('../../../shared/helpers.js');
const DOMPurify = require('dompurify');
const purifyConfig = { FORCE_BODY: true, SANITIZE_DOM: false };
@@ -163,7 +163,7 @@ const BrewRenderer = (props)=>{
const handleControlKeys = (e)=>{
if(!(e.ctrlKey || e.metaKey)) return;
const P_KEY = 80;
if(e.keyCode == P_KEY && props.allowPrint) printPage();
if(e.keyCode == P_KEY && props.allowPrint) printCurrentBrew();
if(e.keyCode == P_KEY) {
e.stopPropagation();
e.preventDefault();