0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-15 04:02:38 +00:00

Lint the jsx files

This commit is contained in:
Trevor Buckner
2024-08-24 23:55:17 -04:00
parent bf6eae7b3c
commit 4b0b56dd35
2 changed files with 7 additions and 7 deletions

View File

@@ -87,12 +87,12 @@ const BrewRenderer = (props)=>{
}));
};
const getCurrentPage = (e) => {
const getCurrentPage = (e)=>{
const { scrollTop, clientHeight, scrollHeight } = e.target;
const totalScrollableHeight = scrollHeight - clientHeight;
const currentPageNumber = Math.ceil((scrollTop / totalScrollableHeight) * rawPages.length);
setState((prevState) => ({
setState((prevState)=>({
...prevState,
currentPageNumber : currentPageNumber || 1
}));
@@ -181,7 +181,7 @@ const BrewRenderer = (props)=>{
};
//Toolbar settings:
const handleZoom = (newZoom) => {
const handleZoom = (newZoom)=>{
setState((prevState)=>({
...prevState,
zoom : newZoom