Figured out how to export ToC via mdx-loader

This commit is contained in:
Piotr Janosz
2019-07-10 20:25:38 +02:00
committed by fabioberger
parent 8bd2411a89
commit 1ded7cd4f1
4 changed files with 15 additions and 7 deletions

View File

@@ -60,7 +60,10 @@ export const DocsView: React.FC<IDocsViewProps> = props => {
const loadPageAsync = async (fileName: string) => {
const component = await import(`../../../md/new-docs/${fileName}.mdx`);
if (component) {
console.log('component', component);
console.log('component.tableOfContents()', component.tableOfContents());
setState({
// title: component.meta.title,
Component: component.default,