From d1ab5ddb5b6080ce3eb2f8ccf2005acc5ceaab2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20Bl=C3=A4ttermann?= Date: Mon, 14 Nov 2022 00:34:44 +0100 Subject: [PATCH] Remove outdated MDX handling --- website/src/components/layout/index.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/website/src/components/layout/index.js b/website/src/components/layout/index.js index 8467a1d7c..a2459d357 100644 --- a/website/src/components/layout/index.js +++ b/website/src/components/layout/index.js @@ -69,13 +69,6 @@ class Layout extends React.Component { } static propTypes = { - data: PropTypes.shape({ - mdx: PropTypes.shape({ - code: PropTypes.shape({ - body: PropTypes.string.isRequired, - }).isRequired, - }), - }).isRequired, scope: PropTypes.object.isRequired, pageContext: PropTypes.shape({ title: PropTypes.string, @@ -102,18 +95,11 @@ class Layout extends React.Component { } render() { - const { data, pageContext, location, children } = this.props - const { file, site = {} } = data || {} - const mdx = file ? file.childMdx : null + const { pageContext, location, children } = this.props const { title, section, sectionTitle, teaser, theme = 'blue', searchExclude } = pageContext const uiTheme = nightly ? 'nightly' : legacy ? 'legacy' : theme const bodyClass = classNames(`theme-${uiTheme}`, { 'search-exclude': !!searchExclude }) const isDocs = ['usage', 'models', 'api', 'styleguide'].includes(section) - const content = !mdx ? null : ( - - {mdx.code.body} - - ) return ( <> @@ -146,7 +132,6 @@ class Layout extends React.Component { ) : (
{children} - {content}
)} @@ -155,4 +140,4 @@ class Layout extends React.Component { } } -export default withMDXScope(Layout) +export default Layout