Figured out how to export ToC via mdx-loader
This commit is contained in:
committed by
fabioberger
parent
8bd2411a89
commit
1ded7cd4f1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user