mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-09 05:05:52 +08:00
feature: 1. add TOC & adjust get eidtor style;
This commit is contained in:
@@ -124,9 +124,7 @@ export const TOC = () => {
|
|||||||
const listenerMapRef = useRef<ListenerMap>(new Map());
|
const listenerMapRef = useRef<ListenerMap>(new Map());
|
||||||
|
|
||||||
const { currentEditors } = useCurrentEditors();
|
const { currentEditors } = useCurrentEditors();
|
||||||
const editor = useMemo(() => {
|
const editor = currentEditors[page_id] as Virgo;
|
||||||
return currentEditors[page_id] as Virgo;
|
|
||||||
}, [currentEditors, page_id]);
|
|
||||||
|
|
||||||
const updateTocDataSource = useCallback(async () => {
|
const updateTocDataSource = useCallback(async () => {
|
||||||
if (!editor) {
|
if (!editor) {
|
||||||
|
|||||||
Reference in New Issue
Block a user