mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor: environment setup (#2898)
Co-authored-by: Simon He <57086651+Simon-He95@users.noreply.github.com>
This commit is contained in:
@@ -9,8 +9,8 @@ import {
|
||||
WorkspaceFallback,
|
||||
} from '@affine/component/workspace';
|
||||
import { DebugLogger } from '@affine/debug';
|
||||
import { config, DEFAULT_HELLO_WORLD_PAGE_ID, env } from '@affine/env';
|
||||
import { initEmptyPage, initPageWithPreloading } from '@affine/env/blocksuite';
|
||||
import { DEFAULT_HELLO_WORLD_PAGE_ID, isDesktop } from '@affine/env/constant';
|
||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||
import { setUpLanguage, useI18N } from '@affine/i18n';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
@@ -350,7 +350,7 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
|
||||
id: pageId,
|
||||
});
|
||||
assertEquals(page.id, pageId);
|
||||
if (config.enablePreloading) {
|
||||
if (runtimeConfig.enablePreloading) {
|
||||
initPageWithPreloading(page).catch(error => {
|
||||
console.error('import error:', error);
|
||||
});
|
||||
@@ -455,7 +455,7 @@ export const WorkspaceLayoutInner: FC<PropsWithChildren> = ({ children }) => {
|
||||
);
|
||||
const t = useAFFiNEI18N();
|
||||
|
||||
const showList: IslandItemNames[] = env.isDesktop
|
||||
const showList: IslandItemNames[] = isDesktop
|
||||
? ['whatNew', 'contact', 'guide']
|
||||
: ['whatNew', 'contact'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user