refactor: move command registry to frontend/core (#7135)

move command registeration related logic out of infra module.
This commit is contained in:
pengx17
2024-06-05 14:09:20 +00:00
parent fa4e4c738a
commit de81527e29
24 changed files with 31 additions and 32 deletions
@@ -1,4 +1,8 @@
import { toast } from '@affine/component';
import {
PreconditionStrategy,
registerAffineCommand,
} from '@affine/core/commands';
import { useDocMetaHelper } from '@affine/core/hooks/use-block-suite-page-meta';
import { FavoriteItemsAdapter } from '@affine/core/modules/properties';
import { mixpanel } from '@affine/core/utils';
@@ -8,8 +12,6 @@ import { assertExists } from '@blocksuite/global/utils';
import { EdgelessIcon, HistoryIcon, PageIcon } from '@blocksuite/icons';
import {
DocService,
PreconditionStrategy,
registerAffineCommand,
useLiveData,
useService,
WorkspaceService,
@@ -1,5 +1,5 @@
import { registerAffineCommand } from '@affine/core/commands';
import { useSharingUrl } from '@affine/core/hooks/affine/use-share-url';
import { registerAffineCommand } from '@toeverything/infra';
import { useEffect } from 'react';
export function useRegisterCopyLinkCommands({
@@ -1,5 +1,6 @@
import { registerAffineCommand } from '@affine/core/commands';
import { FindInPageService } from '@affine/core/modules/find-in-page/services/find-in-page';
import { registerAffineCommand, useService } from '@toeverything/infra';
import { useService } from '@toeverything/infra';
import { useCallback, useEffect } from 'react';
export function useRegisterFindInPageCommands() {