fix(client): update text container for fsd lessons (#65889)

This commit is contained in:
Aditya Singh
2026-03-05 11:10:20 +05:30
committed by GitHub
parent 2972485a87
commit 695419bfb2
@@ -77,15 +77,31 @@ function renderNodule(
) {
switch (nodule.type) {
case 'paragraph':
return <PrismFormatted text={nodule.contents} />;
return (
<Col xs={12} md={10} mdOffset={1} lg={8} lgOffset={2}>
<PrismFormatted text={nodule.contents} />
</Col>
);
case 'interactiveEditor':
if (showInteractiveEditor) {
return <InteractiveEditor files={nodule.files} />;
return (
<>
<Spacer size='s' />
<Col xs={12} md={12} lg={10} lgOffset={1}>
<InteractiveEditor files={nodule.files} />
</Col>
<Spacer size='s' />
</>
);
} else {
const { files } = nodule;
return files.map((file, index) => (
<PrismFormatted key={index} text={file.contentsHtml} />
));
return (
<Col xs={12} md={10} mdOffset={1} lg={8} lgOffset={2}>
{files.map((file, index) => (
<PrismFormatted key={index} text={file.contentsHtml} />
))}
</Col>
);
}
default:
return null;