mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
feat: bump blocksuite (#5673)
This commit is contained in:
@@ -31,17 +31,15 @@ export const PresentButton = () => {
|
||||
const editorRoot = document.querySelector('editor-host');
|
||||
if (!editorRoot) return;
|
||||
|
||||
// TODO: use surfaceService subAtom
|
||||
const surfaceService = editorRoot?.spec.getService(
|
||||
'affine:surface'
|
||||
) as SurfaceService;
|
||||
const edgelessPage = editorRoot?.querySelector('affine-edgeless-page');
|
||||
if (!edgelessPage) return;
|
||||
|
||||
surfaceService.slots.edgelessToolUpdated.on(() => {
|
||||
setIsPresent(surfaceService?.currentTool?.type === 'frameNavigator');
|
||||
edgelessPage.slots.edgelessToolUpdated.on(() => {
|
||||
setIsPresent(edgelessPage.edgelessTool.type === 'frameNavigator');
|
||||
});
|
||||
|
||||
return () => {
|
||||
surfaceService.slots.edgelessToolUpdated.dispose();
|
||||
edgelessPage.slots.edgelessToolUpdated.dispose();
|
||||
};
|
||||
}, [isPresent]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user