File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
packages/frontend/src/help Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -22,13 +22,16 @@ export default function LogicHelpPage() {
2222}
2323
2424function LogicHelpDetail ( props : { theory : Theory } ) {
25- const Content = lazy ( async ( ) => {
26- try {
27- return await import ( `./logics/${ props . theory . id } .mdx` ) ;
28- } catch {
29- return { default : LogicHelpNotFound } ;
30- }
31- } ) ;
25+ const [ content ] = createResource (
26+ ( ) => props . theory . id ,
27+ async ( theoryId ) => {
28+ try {
29+ return await import ( `./logics/${ theoryId } .mdx` ) ;
30+ } catch {
31+ return { default : LogicHelpNotFound } ;
32+ }
33+ } ,
34+ ) ;
3235
3336 return (
3437 < >
@@ -73,7 +76,9 @@ function LogicHelpDetail(props: { theory: Theory }) {
7376 </ Show >
7477 </ div >
7578 </ Show >
76- < Content theory = { props . theory } />
79+ < Show when = { content ( ) } >
80+ { ( module ) => < Dynamic component = { module ( ) . default } theory = { props . theory } /> }
81+ </ Show >
7782 </ >
7883 ) ;
7984}
You can’t perform that action at this time.
0 commit comments