mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 02:56:23 +08:00
feat(core): add outline viewer for share page (#8190)
This commit is contained in:
@@ -11,7 +11,7 @@ export const EditorOutlineViewer = ({
|
||||
}: {
|
||||
editor: AffineEditorContainer | null;
|
||||
show: boolean;
|
||||
openOutlinePanel: () => void;
|
||||
openOutlinePanel?: () => void;
|
||||
}) => {
|
||||
const outlineViewerRef = useRef<OutlineViewer | null>(null);
|
||||
|
||||
@@ -34,7 +34,10 @@ export const EditorOutlineViewer = ({
|
||||
if (outlineViewerRef.current.editor !== editor) {
|
||||
outlineViewerRef.current.editor = editor;
|
||||
}
|
||||
if (outlineViewerRef.current.toggleOutlinePanel !== openOutlinePanel) {
|
||||
if (
|
||||
outlineViewerRef.current.toggleOutlinePanel !== openOutlinePanel &&
|
||||
openOutlinePanel
|
||||
) {
|
||||
outlineViewerRef.current.toggleOutlinePanel = openOutlinePanel;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user