mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 05:29:08 +08:00
fix: remove hello-world page (#3234)
(cherry picked from commit ea592eb150)
This commit is contained in:
@@ -188,9 +188,7 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
|
|||||||
const { jumpToPage } = useRouterHelper(router);
|
const { jumpToPage } = useRouterHelper(router);
|
||||||
|
|
||||||
//#region init workspace
|
//#region init workspace
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
if (currentWorkspace.blockSuiteWorkspace.isEmpty) {
|
||||||
// @ts-expect-error
|
|
||||||
if (currentWorkspace.blockSuiteWorkspace.meta._proxy.isEmpty !== true) {
|
|
||||||
// this is a new workspace, so we should redirect to the new page
|
// this is a new workspace, so we should redirect to the new page
|
||||||
const pageId = `${currentWorkspace.blockSuiteWorkspace.id}-${DEFAULT_HELLO_WORLD_PAGE_ID_SUFFIX}`;
|
const pageId = `${currentWorkspace.blockSuiteWorkspace.id}-${DEFAULT_HELLO_WORLD_PAGE_ID_SUFFIX}`;
|
||||||
if (currentWorkspace.blockSuiteWorkspace.getPage(pageId) === null) {
|
if (currentWorkspace.blockSuiteWorkspace.getPage(pageId) === null) {
|
||||||
@@ -207,9 +205,6 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
|
|||||||
console.error('init empty page error', error);
|
console.error('init empty page error', error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-expect-error
|
|
||||||
currentWorkspace.blockSuiteWorkspace.meta._proxy.isEmpty = false;
|
|
||||||
if (!router.query.pageId) {
|
if (!router.query.pageId) {
|
||||||
setCurrentPageId(pageId);
|
setCurrentPageId(pageId);
|
||||||
jumpToPage(currentWorkspace.id, pageId).catch(console.error);
|
jumpToPage(currentWorkspace.id, pageId).catch(console.error);
|
||||||
|
|||||||
Reference in New Issue
Block a user