- {renderTOCContent(tocDataSource)}
+ {renderTOCContent(tocDataSource)}
);
};
diff --git a/apps/ligo-virgo/src/pages/workspace/docs/components/toc/index.ts b/apps/ligo-virgo/src/pages/workspace/docs/components/toc/index.ts
index e603af824..1e45e9bd0 100644
--- a/apps/ligo-virgo/src/pages/workspace/docs/components/toc/index.ts
+++ b/apps/ligo-virgo/src/pages/workspace/docs/components/toc/index.ts
@@ -1 +1 @@
-export { TOC } from './TOC';
+export { Toc } from './Toc';
diff --git a/apps/ligo-virgo/src/pages/workspace/docs/utils/getPageContentById.ts b/apps/ligo-virgo/src/pages/workspace/docs/utils/toc.ts
similarity index 67%
rename from apps/ligo-virgo/src/pages/workspace/docs/utils/getPageContentById.ts
rename to apps/ligo-virgo/src/pages/workspace/docs/utils/toc.ts
index b1d16cb9d..8331b0726 100644
--- a/apps/ligo-virgo/src/pages/workspace/docs/utils/getPageContentById.ts
+++ b/apps/ligo-virgo/src/pages/workspace/docs/utils/toc.ts
@@ -1,4 +1,4 @@
-import type { BlockEditor } from '@toeverything/components/editor-core';
+import { AsyncBlock } from '@toeverything/components/editor-core';
export const BLOCK_TYPES = {
GROUP: 'group',
@@ -7,23 +7,29 @@ export const BLOCK_TYPES = {
HEADING3: 'heading3',
};
-const getContentByAsyncBlocks = async (asyncBlocks = []) => {
+/* ππsorry, I don't know how to define unlimited dimensions array */
+const getContentByAsyncBlocks = async (
+ asyncBlocks: AsyncBlock[] = [],
+ callback: () => void
+): Promise