mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): update text container for fsd lessons (#65889)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user