зеркало из https://github.com/github/docs.git
Fixing index page body text rendering (#21811)
* fixing index page body text rendering * always use renderedPage
This commit is contained in:
Родитель
000799df17
Коммит
bfe529c40a
|
@ -38,7 +38,6 @@ export const useTocLandingContext = (): TocLandingContextT => {
|
|||
}
|
||||
|
||||
export const getTocLandingContextFromRequest = (req: any): TocLandingContextT => {
|
||||
const isEarlyAccess = req.context.page?.documentType === 'early-access'
|
||||
return {
|
||||
title: req.context.page.titlePlainText,
|
||||
productCallout: req.context.page.product || '',
|
||||
|
@ -49,7 +48,7 @@ export const getTocLandingContextFromRequest = (req: any): TocLandingContextT =>
|
|||
variant: req.context.genericTocFlat ? 'expanded' : 'compact',
|
||||
|
||||
featuredLinks: getFeaturedLinksFromReq(req),
|
||||
renderedPage: isEarlyAccess ? req.context.renderedPage : '',
|
||||
renderedPage: req.context.renderedPage,
|
||||
currentLearningTrack: req.context.currentLearningTrack,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ export const TocLanding = () => {
|
|||
)}
|
||||
|
||||
{renderedPage && (
|
||||
<div id="article-contents">
|
||||
<div id="article-contents" className="mb-5">
|
||||
<MarkdownContent>{renderedPage}</MarkdownContent>
|
||||
</div>
|
||||
)}
|
||||
|
|
Загрузка…
Ссылка в новой задаче