File tree 2 files changed +9
-2
lines changed
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';
24
24
25
25
<Layout title ={ title } meta ={ meta } >
26
26
<PageLoadingIndicator />
27
- <div id =" previews-container" ></div >
27
+ <div id =" previews-container" style = " display: none; " ></div >
28
28
<main class =" max-w-full flex flex-col h-full overflow-hidden" data-swap-root >
29
29
<TopBarWrapper logoLink ={ logoLink ?? ' /' } openInStackBlitz ={ lesson .data .openInStackBlitz } />
30
30
<MainContainer lesson ={ lesson } navList ={ navList } />
Original file line number Diff line number Diff line change @@ -62,7 +62,14 @@ export const PreviewPanel = memo(
62
62
useEffect ( ( ) => {
63
63
// we update the iframes position at max fps if we have any
64
64
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
+ } ;
66
73
}
67
74
68
75
return undefined ;
You can’t perform that action at this time.
0 commit comments