mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +08:00
refactor: move command registry to frontend/core (#7135)
move command registeration related logic out of infra module.
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user