File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ meta.description ??= 'A TutorialKit interactive lesson';
2424
2525<Layout title ={ title } meta ={ meta } >
2626 <PageLoadingIndicator />
27- <div id =" previews-container" ></div >
27+ <div id =" previews-container" style = " display: none; " ></div >
2828 <main class =" max-w-full flex flex-col h-full overflow-hidden" data-swap-root >
2929 <TopBarWrapper logoLink ={ logoLink ?? ' /' } openInStackBlitz ={ lesson .data .openInStackBlitz } />
3030 <MainContainer lesson ={ lesson } navList ={ navList } />
Original file line number Diff line number Diff line change @@ -62,7 +62,14 @@ export const PreviewPanel = memo(
6262 useEffect ( ( ) => {
6363 // we update the iframes position at max fps if we have any
6464 if ( hasPreviews ) {
65- return requestAnimationFrameLoop ( onResize ) ;
65+ const cancel = requestAnimationFrameLoop ( onResize ) ;
66+
67+ previewsContainer . style . display = 'block' ;
68+
69+ return ( ) => {
70+ previewsContainer . style . display = 'none' ;
71+ cancel ( ) ;
72+ } ;
6673 }
6774
6875 return undefined ;
You can’t perform that action at this time.
0 commit comments