mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-30 08:39:53 +08:00
Merge branch 'feat/filesystem_and_search' of github.com:toeverything/AFFiNE into feat/filesystem_and_search
This commit is contained in:
@@ -35,10 +35,10 @@ const Home: NextPage = () => {
|
||||
return ret;
|
||||
}
|
||||
|
||||
const editor = createEditor(page);
|
||||
const editor = createEditor?.current?.(page);
|
||||
if (editor) {
|
||||
editorContainer.current?.appendChild(editor);
|
||||
setEditor(editor);
|
||||
setEditor?.current?.(editor);
|
||||
if (page.isEmpty) {
|
||||
const title = 'Welcome to the AFFiNE Alpha';
|
||||
const pageId = page.addBlock({
|
||||
@@ -53,7 +53,7 @@ const Home: NextPage = () => {
|
||||
}
|
||||
|
||||
return ret;
|
||||
}, [workspace, page]);
|
||||
}, [workspace, page, createEditor, setEditor]);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -19,13 +19,13 @@ const Page = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
createPage()?.then(async pageId => {
|
||||
createPage?.current?.()?.then(async pageId => {
|
||||
if (!pageId) {
|
||||
return;
|
||||
}
|
||||
router.push(`/workspace/${currentWorkspaceId}/${pageId}`);
|
||||
});
|
||||
}, [workspace, currentWorkspaceId]);
|
||||
}, [workspace, currentWorkspaceId, createPage, router]);
|
||||
|
||||
return <div>Hello, there is [pageId]/index</div>;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user