mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-15 05:37:32 +00:00
style: enable import-x/no-duplicates (#6279)
This commit is contained in:
@@ -11,20 +11,16 @@ import { pushNotificationAtom } from '@affine/component/notification-center';
|
||||
import {
|
||||
changeEmailMutation,
|
||||
changePasswordMutation,
|
||||
fetcher,
|
||||
sendVerifyChangeEmailMutation,
|
||||
verifyEmailMutation,
|
||||
} from '@affine/graphql';
|
||||
import { fetcher } from '@affine/graphql';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { useSetAtom } from 'jotai/react';
|
||||
import type { ReactElement } from 'react';
|
||||
import { useCallback } from 'react';
|
||||
import {
|
||||
type LoaderFunction,
|
||||
redirect,
|
||||
useParams,
|
||||
useSearchParams,
|
||||
} from 'react-router-dom';
|
||||
import type { LoaderFunction } from 'react-router-dom';
|
||||
import { redirect, useParams, useSearchParams } from 'react-router-dom';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { SubscriptionRedirect } from '../components/affine/auth/subscription-redirect';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { OAuthProviderType } from '@affine/graphql';
|
||||
import { type LoaderFunction } from 'react-router-dom';
|
||||
import type { LoaderFunction } from 'react-router-dom';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { getSession } from '../hooks/affine/use-current-user';
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { Menu } from '@affine/component/ui/menu';
|
||||
import { WorkspaceManager } from '@toeverything/infra';
|
||||
import { WorkspaceListService } from '@toeverything/infra';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { useLiveData } from '@toeverything/infra';
|
||||
import {
|
||||
useLiveData,
|
||||
useService,
|
||||
WorkspaceListService,
|
||||
WorkspaceManager,
|
||||
} from '@toeverything/infra';
|
||||
import { lazy, useEffect, useLayoutEffect, useState } from 'react';
|
||||
import { type LoaderFunction } from 'react-router-dom';
|
||||
import type { LoaderFunction } from 'react-router-dom';
|
||||
|
||||
import { createFirstAppData } from '../bootstrap/first-app-data';
|
||||
import { UserWithWorkspaceList } from '../components/pure/workspace-slider-bar/user-with-workspace-list';
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
import { AcceptInvitePage } from '@affine/component/member-components';
|
||||
import { WorkspaceSubPath } from '@affine/core/shared';
|
||||
import type { GetInviteInfoQuery } from '@affine/graphql';
|
||||
import {
|
||||
acceptInviteByInviteIdMutation,
|
||||
type GetInviteInfoQuery,
|
||||
fetcher,
|
||||
getInviteInfoQuery,
|
||||
} from '@affine/graphql';
|
||||
import { fetcher } from '@affine/graphql';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { useCallback, useEffect } from 'react';
|
||||
import { type LoaderFunction, redirect, useLoaderData } from 'react-router-dom';
|
||||
import type { LoaderFunction } from 'react-router-dom';
|
||||
import { redirect, useLoaderData } from 'react-router-dom';
|
||||
|
||||
import { authAtom } from '../atoms';
|
||||
import { setOnceSignedInEventAtom } from '../atoms/event';
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
import { Button } from '@affine/component/ui/button';
|
||||
import { type GetCurrentUserQuery, getCurrentUserQuery } from '@affine/graphql';
|
||||
import { fetcher } from '@affine/graphql';
|
||||
import type { GetCurrentUserQuery } from '@affine/graphql';
|
||||
import { fetcher, getCurrentUserQuery } from '@affine/graphql';
|
||||
import { Trans } from '@affine/i18n';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { Logo1Icon } from '@blocksuite/icons';
|
||||
import { useCallback, useMemo } from 'react';
|
||||
import {
|
||||
type LoaderFunction,
|
||||
useLoaderData,
|
||||
useSearchParams,
|
||||
} from 'react-router-dom';
|
||||
import type { LoaderFunction } from 'react-router-dom';
|
||||
import { useLoaderData, useSearchParams } from 'react-router-dom';
|
||||
import { z } from 'zod';
|
||||
|
||||
import * as styles from './open-app.css';
|
||||
|
||||
@@ -13,13 +13,13 @@ import { noop } from '@blocksuite/global/utils';
|
||||
import { Logo1Icon } from '@blocksuite/icons';
|
||||
import type { AffineEditorContainer } from '@blocksuite/presets';
|
||||
import type { Doc as BlockSuiteDoc } from '@blocksuite/store';
|
||||
import type { Doc } from '@toeverything/infra';
|
||||
import type { Doc, PageMode } from '@toeverything/infra';
|
||||
import {
|
||||
DocStorageImpl,
|
||||
EmptyBlobStorage,
|
||||
LocalBlobStorage,
|
||||
PageManager,
|
||||
type PageMode,
|
||||
ReadonlyDocStorage,
|
||||
RemoteBlobStorage,
|
||||
ServiceProviderContext,
|
||||
useLiveData,
|
||||
@@ -28,7 +28,6 @@ import {
|
||||
WorkspaceManager,
|
||||
WorkspaceScope,
|
||||
} from '@toeverything/infra';
|
||||
import { ReadonlyDocStorage } from '@toeverything/infra';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import type { LoaderFunction } from 'react-router-dom';
|
||||
import {
|
||||
|
||||
@@ -5,7 +5,8 @@ import { useCallback, useEffect, useRef } from 'react';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
import { authAtom } from '../atoms';
|
||||
import { AuthPanel, type AuthProps } from '../components/affine/auth';
|
||||
import type { AuthProps } from '../components/affine/auth';
|
||||
import { AuthPanel } from '../components/affine/auth';
|
||||
import { SubscriptionRedirect } from '../components/affine/auth/subscription-redirect';
|
||||
import { useSubscriptionSearch } from '../components/affine/auth/use-subscription';
|
||||
import { useCurrentLoginStatus } from '../hooks/affine/use-current-login-status';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { CollectionMeta } from '@affine/core/components/page-list';
|
||||
import {
|
||||
CollectionListHeader,
|
||||
type CollectionMeta,
|
||||
createEmptyCollection,
|
||||
useEditCollectionName,
|
||||
VirtualizedCollectionList,
|
||||
@@ -8,9 +8,7 @@ import {
|
||||
import { useAllPageListConfig } from '@affine/core/hooks/affine/use-all-page-list-config';
|
||||
import { useNavigateHelper } from '@affine/core/hooks/use-navigate-helper';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { useLiveData } from '@toeverything/infra';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useLiveData, useService, Workspace } from '@toeverything/infra';
|
||||
import { nanoid } from 'nanoid';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { CollectionService } from '@affine/core/modules/collection';
|
||||
import type { Collection, Filter } from '@affine/env/filter';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useService, Workspace } from '@toeverything/infra';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { filterContainerStyle } from '../../../components/filter-container.css';
|
||||
|
||||
@@ -6,8 +6,7 @@ import { Header } from '@affine/core/components/pure/header';
|
||||
import { WorkspaceModeFilterTab } from '@affine/core/components/pure/workspace-mode-filter-tab';
|
||||
import type { Filter } from '@affine/env/filter';
|
||||
import { PlusIcon } from '@blocksuite/icons';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useService, Workspace } from '@toeverything/infra';
|
||||
import clsx from 'clsx';
|
||||
|
||||
import * as styles from './all-page.css';
|
||||
|
||||
@@ -7,8 +7,7 @@ import { useBlockSuiteDocMeta } from '@affine/core/hooks/use-block-suite-page-me
|
||||
import { useNavigateHelper } from '@affine/core/hooks/use-navigate-helper';
|
||||
import { performanceRenderLogger } from '@affine/core/shared';
|
||||
import type { Filter } from '@affine/env/filter';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useService, Workspace } from '@toeverything/infra';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
import { ViewBodyIsland, ViewHeaderIsland } from '../../../modules/workbench';
|
||||
|
||||
@@ -16,9 +16,7 @@ import {
|
||||
PageIcon,
|
||||
ViewLayersIcon,
|
||||
} from '@blocksuite/icons';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { useLiveData } from '@toeverything/infra';
|
||||
import { useLiveData, useService, Workspace } from '@toeverything/infra';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
@@ -22,14 +22,14 @@ import {
|
||||
PageRecordList,
|
||||
ServiceProviderContext,
|
||||
useLiveData,
|
||||
useService,
|
||||
Workspace,
|
||||
} from '@toeverything/infra';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import clsx from 'clsx';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import type { ReactElement } from 'react';
|
||||
import {
|
||||
memo,
|
||||
type ReactElement,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useLayoutEffect,
|
||||
@@ -50,12 +50,12 @@ import { useRegisterBlocksuiteEditorCommands } from '../../../hooks/affine/use-r
|
||||
import { useActiveBlocksuiteEditor } from '../../../hooks/use-block-suite-editor';
|
||||
import { usePageDocumentTitle } from '../../../hooks/use-global-state';
|
||||
import { useNavigateHelper } from '../../../hooks/use-navigate-helper';
|
||||
import type { SidebarTabName } from '../../../modules/multi-tab-sidebar';
|
||||
import {
|
||||
MultiTabSidebarBody,
|
||||
MultiTabSidebarHeaderSwitcher,
|
||||
type SidebarTabName,
|
||||
sidebarTabs,
|
||||
} from '../../../modules/multi-tab-sidebar';
|
||||
import { sidebarTabs } from '../../../modules/multi-tab-sidebar';
|
||||
import { RightSidebarViewIsland } from '../../../modules/right-sidebar';
|
||||
import {
|
||||
useIsActiveView,
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import { useWorkspace } from '@affine/core/hooks/use-workspace';
|
||||
import type { Workspace } from '@toeverything/infra';
|
||||
import { WorkspaceListService, WorkspaceManager } from '@toeverything/infra';
|
||||
import { ServiceProviderContext, useService } from '@toeverything/infra';
|
||||
import { useLiveData } from '@toeverything/infra';
|
||||
import { type ReactElement, Suspense, useEffect, useMemo } from 'react';
|
||||
import {
|
||||
ServiceProviderContext,
|
||||
useLiveData,
|
||||
useService,
|
||||
WorkspaceListService,
|
||||
WorkspaceManager,
|
||||
} from '@toeverything/infra';
|
||||
import type { ReactElement } from 'react';
|
||||
import { Suspense, useEffect, useMemo } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
import { AffineErrorBoundary } from '../../components/affine/affine-error-boundary';
|
||||
|
||||
@@ -2,7 +2,8 @@ import { Empty } from '@affine/component';
|
||||
import { Trans } from '@affine/i18n';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import type { DocCollection } from '@blocksuite/store';
|
||||
import { type ReactNode, useCallback } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { usePageHelper } from '../../components/blocksuite/block-suite-page-list/utils';
|
||||
import * as styles from './page-list-empty.css';
|
||||
|
||||
@@ -8,8 +8,7 @@ import {
|
||||
ViewBodyIsland,
|
||||
ViewHeaderIsland,
|
||||
} from '@affine/core/modules/workbench';
|
||||
import { useLiveData, useService } from '@toeverything/infra';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useLiveData, useService, Workspace } from '@toeverything/infra';
|
||||
import { useMemo } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { toast } from '@affine/component';
|
||||
import { usePageHelper } from '@affine/core/components/blocksuite/block-suite-page-list/utils';
|
||||
import type { ListItem } from '@affine/core/components/page-list';
|
||||
import {
|
||||
type ListItem,
|
||||
ListTableHeader,
|
||||
PageListItemRenderer,
|
||||
TrashOperationCell,
|
||||
@@ -17,8 +17,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { assertExists } from '@blocksuite/global/utils';
|
||||
import { DeleteIcon } from '@blocksuite/icons';
|
||||
import type { DocMeta } from '@blocksuite/store';
|
||||
import { Workspace } from '@toeverything/infra';
|
||||
import { useService } from '@toeverything/infra';
|
||||
import { useService, Workspace } from '@toeverything/infra';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { ViewBodyIsland, ViewHeaderIsland } from '../../modules/workbench';
|
||||
|
||||
Reference in New Issue
Block a user