style: no import infra submodule (#6278)

This commit is contained in:
EYHN
2024-03-25 03:55:29 +00:00
parent b93871f045
commit 7ce2bfbf0b
81 changed files with 105 additions and 122 deletions
@@ -6,7 +6,7 @@ import 'fake-indexeddb/auto';
import { WorkspacePropertiesAdapter } from '@affine/core/modules/workspace';
import { render } from '@testing-library/react';
import { Workspace } from '@toeverything/infra';
import { ServiceProviderContext, useService } from '@toeverything/infra/di';
import { ServiceProviderContext, useService } from '@toeverything/infra';
import { createStore, Provider } from 'jotai';
import { Suspense } from 'react';
import { describe, expect, test, vi } from 'vitest';
@@ -7,7 +7,7 @@ import { useBlockSuiteDocMeta } from '@affine/core/hooks/use-block-suite-page-me
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import type { DocMeta } from '@blocksuite/store';
import { Workspace } from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useCallback, useMemo } from 'react';
import { usePageHelper } from '../../components/blocksuite/block-suite-page-list/utils';
@@ -1,4 +1,4 @@
import { type AppSetting, appSettingAtom } from '@toeverything/infra/atom';
import { type AppSetting, appSettingAtom } from '@toeverything/infra';
import { useAtom } from 'jotai';
import { useCallback, useMemo } from 'react';
@@ -8,8 +8,8 @@ import { Doc, useLiveData, Workspace } from '@toeverything/infra';
import {
PreconditionStrategy,
registerAffineCommand,
} from '@toeverything/infra/command';
import { useService } from '@toeverything/infra/di';
} from '@toeverything/infra';
import { useService } from '@toeverything/infra';
import { useSetAtom } from 'jotai';
import { useCallback, useEffect } from 'react';
@@ -4,7 +4,7 @@ import { useDocMetaHelper } from '@affine/core/hooks/use-block-suite-page-meta';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core';
import { Workspace } from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useCallback } from 'react';
import { useBlockSuiteMetaHelper } from './use-block-suite-meta-helper';
@@ -1,5 +1,5 @@
import type { Workspace } from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useDebouncedState } from 'foxact/use-debounced-state';
import { useEffect, useMemo } from 'react';
@@ -5,7 +5,7 @@ import {
type AppConfigSchema,
AppConfigStorage,
defaultAppConfig,
} from '@toeverything/infra/app-config-storage';
} from '@toeverything/infra';
import { type Dispatch, useEffect, useState } from 'react';
import { useMemo } from 'react';
@@ -1,6 +1,6 @@
import { apis, events, type UpdateMeta } from '@affine/electron-api';
import { isBrowser } from '@affine/env/constant';
import { appSettingAtom } from '@toeverything/infra/atom';
import { appSettingAtom } from '@toeverything/infra';
import { atom, useAtom, useAtomValue } from 'jotai';
import { atomWithObservable, atomWithStorage } from 'jotai/utils';
import { useCallback, useState } from 'react';
@@ -1,6 +1,6 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { Workspace } from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useStore } from 'jotai';
import { useTheme } from 'next-themes';
import { useEffect } from 'react';
@@ -1,5 +1,5 @@
import { WorkspaceManager, type WorkspaceMetadata } from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useEffect, useState } from 'react';
import { useWorkspaceBlobObjectUrl } from './use-workspace-blob';
@@ -1,6 +1,6 @@
import type { WorkspaceMetadata } from '@toeverything/infra';
import { type Workspace, WorkspaceManager } from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useEffect, useState } from 'react';
/**