mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-30 00:29:46 +08:00
Merge branch 'feat/cloud-sync-saika' into feat/poc
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { useAppState } from '@/providers/app-state-provider';
|
||||
import { useRouter } from 'next/router';
|
||||
const defaultOutLineWorkspaceId =
|
||||
'local-first-' + '85b4ca0b9081421d903bbc2501ea280f';
|
||||
const defaultOutLineWorkspaceId = 'affine';
|
||||
// 'local-first-' + '85b4ca0b9081421d903bbc2501ea280f';
|
||||
// It is a fully effective hook
|
||||
// Cause it not just ensure workspace loaded, but also have router change.
|
||||
export const useEnsureWorkspace = () => {
|
||||
|
||||
@@ -17,7 +17,7 @@ export const usePropsUpdated: UsePropsUpdated = () => {
|
||||
return;
|
||||
}
|
||||
setTimeout(() => {
|
||||
editor.model?.propsUpdated.on(() => {
|
||||
editor.pageBlockModel?.propsUpdated.on(() => {
|
||||
callbackQueue.current.forEach(callback => {
|
||||
callback(editor);
|
||||
});
|
||||
@@ -26,7 +26,7 @@ export const usePropsUpdated: UsePropsUpdated = () => {
|
||||
|
||||
return () => {
|
||||
callbackQueue.current = [];
|
||||
editor?.model?.propsUpdated.dispose();
|
||||
editor?.pageBlockModel?.propsUpdated?.dispose();
|
||||
};
|
||||
}, [editor]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user