File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -66,11 +66,11 @@ export const TryItNow = ({
6666 options = { {
6767 autoReload : false ,
6868 autorun : false ,
69- activeFile : "index.tsx " ,
69+ activeFile : "index.ts " ,
7070 } }
7171 template = "vanilla-ts"
7272 files = { {
73- "index.tsx " : {
73+ "index.ts " : {
7474 code :
7575 _enableUnsafeAutoImport && previousCodeAtomValue
7676 ? previousCodeAtomValue
@@ -83,7 +83,7 @@ export const TryItNow = ({
8383 autoImportDependencies && _enableUnsafeAutoImport
8484 ? { ...autoImportDependencies , ...externalDependencies }
8585 : externalDependencies ,
86- entry : "index.tsx " ,
86+ entry : "index.ts " ,
8787 } }
8888 theme = "dark"
8989 >
Original file line number Diff line number Diff line change @@ -213,13 +213,14 @@ sidebarTitle: ${this.escapeText(sidebarLabel)}
213213 title : string ;
214214 embedName : string ;
215215 } ) {
216- this . #includeSidebar = true ;
217- this . insertComponentImport ( "SideBarCta" , "SideBar/index.tsx" ) ;
218- this . insertComponentImport ( "SideBar" , "SideBar/index.tsx" ) ;
216+ // If this is a circular import, skip processing sidebar
219217 if ( ! this . #insertEmbedImport( embedName ) ) {
220- console . error ( `Direct circular import detected, skipping sidebar link` ) ;
218+ // TODO: add debug logging
221219 return ;
222220 }
221+ this . #includeSidebar = true ;
222+ this . insertComponentImport ( "SideBarCta" , "SideBar/index.tsx" ) ;
223+ this . insertComponentImport ( "SideBar" , "SideBar/index.tsx" ) ;
223224 this . #lines. push (
224225 `<p>
225226 <SideBarCta cta="${ `View ${ this . escapeText ( title , { mdxOnly : true } ) } ` } " title="${ this . escapeText ( title ) } ">
You can’t perform that action at this time.
0 commit comments