mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-01 23:52:40 +00:00
Lint
This commit is contained in:
@@ -57,7 +57,7 @@ const BrewRenderer = (props)=>{
|
||||
errors : [],
|
||||
currentEditorCursorPageNum : 0,
|
||||
currentEditorViewPageNum : 0,
|
||||
currentBrewRendererPageNum : 0,
|
||||
currentBrewRendererPageNum : 0,
|
||||
themeBundle : {},
|
||||
onPageChange : ()=>{},
|
||||
...props
|
||||
@@ -89,13 +89,13 @@ const BrewRenderer = (props)=>{
|
||||
}));
|
||||
};
|
||||
|
||||
const updateCurrentPage = useCallback(_.throttle((e) => {
|
||||
const { scrollTop, clientHeight, scrollHeight } = e.target;
|
||||
const totalScrollableHeight = scrollHeight - clientHeight;
|
||||
const currentPageNumber = Math.ceil(((scrollTop + 1) / totalScrollableHeight) * rawPages.length);
|
||||
const updateCurrentPage = useCallback(_.throttle((e)=>{
|
||||
const { scrollTop, clientHeight, scrollHeight } = e.target;
|
||||
const totalScrollableHeight = scrollHeight - clientHeight;
|
||||
const currentPageNumber = Math.ceil(((scrollTop + 1) / totalScrollableHeight) * rawPages.length);
|
||||
|
||||
props.onPageChange(currentPageNumber);
|
||||
}, 200), []);
|
||||
props.onPageChange(currentPageNumber);
|
||||
}, 200), []);
|
||||
|
||||
const isInView = (index)=>{
|
||||
if(!state.isMounted)
|
||||
|
||||
Reference in New Issue
Block a user