fix(org): Left-behind commit for wide docs content on index page
This commit is contained in:
parent
e3d3456dab
commit
f0cfc5d0f1
1 changed files with 19 additions and 11 deletions
|
@ -2,6 +2,8 @@
|
|||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { loadMdxAsStaticProps } from 'shared/mdx/load.mjs'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
// Hooks
|
||||
import { useState } from 'react'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { MdxWrapper } from 'shared/components/wrappers/mdx.mjs'
|
||||
|
@ -9,17 +11,23 @@ import { DocsLayout, ns as layoutNs } from 'site/components/layouts/docs.mjs'
|
|||
|
||||
export const ns = nsMerge('docs', pageNs, layoutNs)
|
||||
|
||||
const DocsHomePage = ({ page, locale, frontmatter, mdx, mdxSlug }) => (
|
||||
<PageWrapper
|
||||
{...page}
|
||||
locale={locale}
|
||||
title={frontmatter.title}
|
||||
intro={frontmatter.intro || frontmatter.lead}
|
||||
layout={(props) => <DocsLayout {...props} {...{ slug: page.path.join('/'), frontmatter }} />}
|
||||
>
|
||||
<MdxWrapper mdx={mdx} site="org" slug={mdxSlug} />
|
||||
</PageWrapper>
|
||||
)
|
||||
const DocsHomePage = ({ page, locale, frontmatter, mdx, mdxSlug }) => {
|
||||
const [wide, setWide] = useState(false)
|
||||
|
||||
return (
|
||||
<PageWrapper
|
||||
{...page}
|
||||
locale={locale}
|
||||
title={frontmatter.title}
|
||||
intro={frontmatter.intro || frontmatter.lead}
|
||||
layout={(props) => (
|
||||
<DocsLayout {...props} {...{ slug: page.path.join('/'), frontmatter, wide, setWide }} />
|
||||
)}
|
||||
>
|
||||
<MdxWrapper mdx={mdx} site="org" slug={mdxSlug} wide={wide} />
|
||||
</PageWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
export default DocsHomePage
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue