mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-30 06:42:45 +00:00
remove "makeZoom" function
The makeZoom function is redundant if we just insert the style a little further down when the `.pages` div is initialized, as a `style` attribute on the tag.
This commit is contained in:
@@ -231,19 +231,6 @@ const BrewRenderer = (props)=>{
|
||||
}));
|
||||
};
|
||||
|
||||
const makeZoom = () => {
|
||||
|
||||
return(
|
||||
<style id='zoomStyle'>
|
||||
{`
|
||||
.pages {
|
||||
zoom: ${state.zoom}%;
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
);
|
||||
}
|
||||
|
||||
const handlePageChange = (pageNumber) => {
|
||||
// Scroll to the desired page
|
||||
scrollToPage(pageNumber);
|
||||
@@ -284,14 +271,13 @@ const BrewRenderer = (props)=>{
|
||||
<RenderWarnings />
|
||||
<NotificationPopup />
|
||||
</div>
|
||||
{makeZoom()}
|
||||
|
||||
{/* Apply CSS from Style tab and render pages from Markdown tab */}
|
||||
{state.isMounted
|
||||
&&
|
||||
<>
|
||||
{renderStyle()}
|
||||
<div className='pages' lang={`${props.lang || 'en'}`}>
|
||||
<div className='pages' lang={`${props.lang || 'en'}`} style={{ zoom: `${state.zoom}%` }}>
|
||||
{renderPages()}
|
||||
</div>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user