0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 18:48:39 +00:00

I feel like there is a cleaner way to handle this, but this embeds as desired and it doesn't blink

This commit is contained in:
David Bolack
2026-03-28 15:24:49 -05:00
parent 8ad208600d
commit e61556e43b
6 changed files with 4 additions and 267 deletions
@@ -340,15 +340,15 @@ const BrewRenderer = (props)=>{
const brewRenderDivWrapper = (
<>
<div id='BrewRenderer'
<div id='BrewRendererFlat'
style={{ width: '100%', height: '100%', visibility: state.visibility }}
onLoad={frameDidMount}
>
{brewRenderFrameContents}
</div>
</>
);
if (!props.showToolbar && state.visibility != 'visible') { frameDidMount(); }
return (
<>
{/*render dummy page while iFrame is mounting.*/}
@@ -369,7 +369,7 @@ const BrewRenderer = (props)=>{
{props.showToolbar ? toolbarEl : ''}
{/*render in iFrame so broken code doesn't crash the site.*/}
{brewRenderDivWrapper}
{props.showToolbar ? brewRenderFrameWrapper:brewRenderDivWrapper}
{state.isMounted &&
<div id='brewRendered'></div>
}