mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-21 16:26:58 +08:00
chore: bump blocksuite (#1298)
Co-authored-by: Himself65 <himself65@outlook.com>
This commit is contained in:
@@ -33,7 +33,7 @@ const PreviewPage: NextPage<PreviewPageProps> = ({
|
||||
'preview',
|
||||
(_: string) => undefined
|
||||
);
|
||||
blockSuiteWorkspace.signals.pageAdded.once(() => {
|
||||
blockSuiteWorkspace.slots.pageAdded.once(() => {
|
||||
setBlockSuiteWorkspace(blockSuiteWorkspace);
|
||||
});
|
||||
blockSuiteWorkspace.createPage('preview');
|
||||
|
||||
@@ -30,7 +30,7 @@ const WorkspaceDetail: React.FC = () => {
|
||||
const [, rerender] = useState(false);
|
||||
// fixme(himself65): this is a hack
|
||||
useEffect(() => {
|
||||
const dispose = currentWorkspace?.blockSuiteWorkspace.signals.pageAdded.on(
|
||||
const dispose = currentWorkspace?.blockSuiteWorkspace.slots.pageAdded.on(
|
||||
id => {
|
||||
if (pageId === id) {
|
||||
rerender(prev => !prev);
|
||||
@@ -40,7 +40,7 @@ const WorkspaceDetail: React.FC = () => {
|
||||
return () => {
|
||||
dispose?.dispose();
|
||||
};
|
||||
}, [currentWorkspace?.blockSuiteWorkspace.signals.pageAdded, pageId]);
|
||||
}, [currentWorkspace?.blockSuiteWorkspace.slots.pageAdded, pageId]);
|
||||
useEffect(() => {
|
||||
if (currentWorkspace) {
|
||||
enableFullFlags(currentWorkspace.blockSuiteWorkspace);
|
||||
|
||||
Reference in New Issue
Block a user