0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 22:42:41 +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:
Gazook89
2024-08-17 20:41:59 -05:00
parent 5a84c0aaa7
commit 9aa7c67c5b
2 changed files with 3 additions and 17 deletions

View File

@@ -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>
</>

View File

@@ -29,12 +29,12 @@
"baseSnippets": false,
"path": "Blank"
},
"journal": {
"Journal": {
"name": "Journal",
"renderer": "V3",
"baseTheme": "Blank",
"baseSnippets": "5ePHB",
"path": "journal"
"path": "Journal"
}
}
}