parent
77dab81b92
commit
ebd351e133
13 changed files with 20 additions and 17 deletions
@ -1,13 +1,21 @@ |
|||||||
import { MDXProvider } from '@mdx-js/react'; |
import MdRenderer from 'components/md-renderer' |
||||||
import MdxComponents from 'components/mdx-components'; |
import SharePage from 'components/share-page'; |
||||||
import { GuideBodyWrap } from './style'; |
import { GuideBodyWrap } from './style'; |
||||||
|
|
||||||
const GuideBody = (props) => ( |
const GuideBody = ({ guide }) => { |
||||||
<MDXProvider components={ MdxComponents }> |
const GuideContent = require(`../../storage/guides/${guide.fileName}.md`).default; |
||||||
|
return ( |
||||||
<GuideBodyWrap> |
<GuideBodyWrap> |
||||||
{ props.children } |
<MdRenderer> |
||||||
|
<GuideContent /> |
||||||
|
<SharePage |
||||||
|
title={ guide.title } |
||||||
|
url={ guide.url } |
||||||
|
twitterUsername={ guide.author.twitter } |
||||||
|
/> |
||||||
|
</MdRenderer> |
||||||
</GuideBodyWrap> |
</GuideBodyWrap> |
||||||
</MDXProvider> |
); |
||||||
); |
}; |
||||||
|
|
||||||
export default GuideBody; |
export default GuideBody; |
||||||
|
Loading…
Reference in new issue