mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-12 23:56:36 +08:00
opti: 1.adjust eventlistener;
This commit is contained in:
@@ -23,7 +23,7 @@ import { useFlag } from '@toeverything/datasource/feature-flags';
|
||||
import { CollapsiblePageTree } from './collapsible-page-tree';
|
||||
import { Tabs } from './components/tabs';
|
||||
import { TabMap, TAB_TITLE } from './components/tabs/Tabs';
|
||||
import { Toc } from './components/toc';
|
||||
import { TOC } from './components/toc';
|
||||
import { WorkspaceName } from './workspace-name';
|
||||
|
||||
type PageProps = {
|
||||
@@ -92,7 +92,7 @@ export function Page(props: PageProps) {
|
||||
)}
|
||||
|
||||
{activeTab === TabMap.get(TAB_TITLE.TOC).value && (
|
||||
<Toc editor={editorRef.current}>TOC</Toc>
|
||||
<TOC editor={editorRef.current}>TOC</TOC>
|
||||
)}
|
||||
</WorkspaceSidebarContent>
|
||||
</WorkspaceSidebar>
|
||||
|
||||
@@ -119,7 +119,7 @@ const renderTOCContent = tocDataSource => {
|
||||
);
|
||||
};
|
||||
|
||||
export const Toc = (props: Props) => {
|
||||
export const TOC = (props: Props) => {
|
||||
const { editor } = props;
|
||||
const { page_id } = useParams();
|
||||
const [tocDataSource, setTocDataSource] = useState<TocType[]>([]);
|
||||
|
||||
@@ -1 +1 @@
|
||||
export { Toc } from './Toc';
|
||||
export { TOC } from './TOC';
|
||||
|
||||
Reference in New Issue
Block a user