0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-29 02:32:37 +00:00

Lint BrewRenderer.jsx

This commit is contained in:
Trevor Buckner
2025-01-07 22:47:04 -05:00
parent 8cc693461d
commit 915137af5e

View File

@@ -50,8 +50,8 @@ const BrewPage = (props)=>{
props.onVisibilityChange(props.index + 1, true, false); // add page to array of visible pages.
else
props.onVisibilityChange(props.index + 1, false, false);
}
)},
});
},
{ threshold: .3, rootMargin: '0px 0px 0px 0px' } // detect when >30% of page is within bounds.
);
@@ -61,8 +61,8 @@ const BrewPage = (props)=>{
entries.forEach((entry)=>{
if(entry.isIntersecting)
props.onVisibilityChange(props.index + 1, true, true); // Set this page as the center page
}
)},
});
},
{ threshold: 0, rootMargin: '-50% 0px -50% 0px' } // Detect when the page is at the center
);