Skip to content

Commit 360f542

Browse files
committed
FIX: Help links in descriptions not navigating correctly
1 parent 5579937 commit 360f542

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

packages/frontend/src/help/logic_help_detail.tsx

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ export default function LogicHelpPage() {
2222
}
2323

2424
function 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
}

0 commit comments

Comments
 (0)