mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
style: restrict type import (#1589)
This commit is contained in:
@@ -3,8 +3,8 @@ import { Modal, ModalCloseButton, ModalWrapper } from '@affine/component';
|
||||
import { Button } from '@affine/component';
|
||||
import { Input } from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import type { KeyboardEvent } from 'react';
|
||||
import { useCallback, useRef, useState } from 'react';
|
||||
import { KeyboardEvent } from 'react';
|
||||
|
||||
interface ModalProps {
|
||||
open: boolean;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { Button } from '@affine/component';
|
||||
import { styled } from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import React, { ChangeEvent, useRef } from 'react';
|
||||
import type { ChangeEvent } from 'react';
|
||||
import type React from 'react';
|
||||
import { useRef } from 'react';
|
||||
|
||||
export type UploadProps = React.PropsWithChildren<{
|
||||
uploadType?: string;
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { FlexWrapper } from '@affine/component';
|
||||
import { IconButton } from '@affine/component';
|
||||
import { Tooltip } from '@affine/component';
|
||||
import { AccessTokenMessage } from '@affine/datacenter';
|
||||
import type { AccessTokenMessage } from '@affine/datacenter';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { CloudWorkspaceIcon, SignOutIcon } from '@blocksuite/icons';
|
||||
import React, { CSSProperties } from 'react';
|
||||
import type { CSSProperties } from 'react';
|
||||
import type React from 'react';
|
||||
|
||||
import { stringToColour } from '../../../utils';
|
||||
import { StyledFooter, StyledSignInButton, StyleUserInfo } from './styles';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { toast } from '@affine/component';
|
||||
import { MessageCode } from '@affine/datacenter';
|
||||
import type { MessageCode } from '@affine/datacenter';
|
||||
import { messages } from '@affine/datacenter';
|
||||
import React, { useEffect } from 'react';
|
||||
import type React from 'react';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
declare global {
|
||||
interface DocumentEventMap {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { IconButton, IconButtonProps } from '@affine/component';
|
||||
import type { IconButtonProps } from '@affine/component';
|
||||
import { IconButton } from '@affine/component';
|
||||
import { styled } from '@affine/component';
|
||||
import { ArrowDownSmallIcon } from '@blocksuite/icons';
|
||||
|
||||
|
||||
@@ -3,12 +3,12 @@ import type { PageBlockModel } from '@blocksuite/blocks';
|
||||
import { PlusIcon } from '@blocksuite/icons';
|
||||
import { assertEquals, nanoid } from '@blocksuite/store';
|
||||
import { Command } from 'cmdk';
|
||||
import { NextRouter } from 'next/router';
|
||||
import React from 'react';
|
||||
import type { NextRouter } from 'next/router';
|
||||
import type React from 'react';
|
||||
|
||||
import { useBlockSuiteWorkspaceHelper } from '../../../hooks/use-blocksuite-workspace-helper';
|
||||
import { useRouterHelper } from '../../../hooks/use-router-helper';
|
||||
import { BlockSuiteWorkspace } from '../../../shared';
|
||||
import type { BlockSuiteWorkspace } from '../../../shared';
|
||||
import { StyledModalFooterContent } from './style';
|
||||
|
||||
export type FooterProps = {
|
||||
|
||||
@@ -2,10 +2,11 @@ import { useTranslation } from '@affine/i18n';
|
||||
import { EdgelessIcon, PageIcon } from '@blocksuite/icons';
|
||||
import { Command } from 'cmdk';
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import type React from 'react';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import { usePageMeta } from '../../../hooks/use-page-meta';
|
||||
import { BlockSuiteWorkspace } from '../../../shared';
|
||||
import type { BlockSuiteWorkspace } from '../../../shared';
|
||||
import { NoResultSVG } from './NoResultSVG';
|
||||
import { StyledListItem, StyledNotFound } from './style';
|
||||
|
||||
|
||||
@@ -3,14 +3,16 @@ import { useTranslation } from '@affine/i18n';
|
||||
import { EdgelessIcon, PageIcon } from '@blocksuite/icons';
|
||||
import { assertExists } from '@blocksuite/store';
|
||||
import { Command } from 'cmdk';
|
||||
import { NextRouter } from 'next/router';
|
||||
import React, { Dispatch, SetStateAction, useEffect } from 'react';
|
||||
import type { NextRouter } from 'next/router';
|
||||
import type { Dispatch, SetStateAction } from 'react';
|
||||
import type React from 'react';
|
||||
import { useEffect } from 'react';
|
||||
|
||||
import { useRecentlyViewed } from '../../../hooks/affine/use-recent-views';
|
||||
import { useBlockSuiteWorkspaceHelper } from '../../../hooks/use-blocksuite-workspace-helper';
|
||||
import { usePageMeta } from '../../../hooks/use-page-meta';
|
||||
import { useRouterHelper } from '../../../hooks/use-router-helper';
|
||||
import { BlockSuiteWorkspace } from '../../../shared';
|
||||
import type { BlockSuiteWorkspace } from '../../../shared';
|
||||
import { useSwitchToConfig } from './config';
|
||||
import { NoResultSVG } from './NoResultSVG';
|
||||
import { StyledListItem, StyledNotFound } from './style';
|
||||
|
||||
@@ -5,7 +5,8 @@ import {
|
||||
FolderIcon,
|
||||
SettingsIcon,
|
||||
} from '@blocksuite/icons';
|
||||
import { FC, SVGProps, useMemo } from 'react';
|
||||
import type { FC, SVGProps } from 'react';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import { pathGenerator } from '../../../shared';
|
||||
export const useSwitchToConfig = (
|
||||
|
||||
@@ -2,8 +2,9 @@ import { Modal, ModalWrapper } from '@affine/component';
|
||||
import { getEnvironment } from '@affine/env';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { Command } from 'cmdk';
|
||||
import { NextRouter } from 'next/router';
|
||||
import React, {
|
||||
import type { NextRouter } from 'next/router';
|
||||
import type React from 'react';
|
||||
import {
|
||||
useCallback,
|
||||
useEffect,
|
||||
useMemo,
|
||||
@@ -12,7 +13,7 @@ import React, {
|
||||
useTransition,
|
||||
} from 'react';
|
||||
|
||||
import { BlockSuiteWorkspace } from '../../../shared';
|
||||
import type { BlockSuiteWorkspace } from '../../../shared';
|
||||
import { Footer } from './Footer';
|
||||
import { PublishedResults } from './PublishedResults';
|
||||
import { Results } from './Results';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { UNTITLED_WORKSPACE_NAME } from '@affine/env';
|
||||
import React from 'react';
|
||||
|
||||
import { useBlockSuiteWorkspaceAvatarUrl } from '../../../hooks/use-blocksuite-workspace-avatar-url';
|
||||
import { BlockSuiteWorkspace, RemWorkspace } from '../../../shared';
|
||||
import type { BlockSuiteWorkspace, RemWorkspace } from '../../../shared';
|
||||
import { stringToColour } from '../../../utils';
|
||||
|
||||
interface AvatarProps {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { PermissionType } from '@affine/datacenter';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { SettingsIcon } from '@blocksuite/icons';
|
||||
import React, { useCallback } from 'react';
|
||||
import type React from 'react';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { useBlockSuiteWorkspaceName } from '../../../hooks/use-blocksuite-workspace-name';
|
||||
import { RemWorkspace, RemWorkspaceFlavour } from '../../../shared';
|
||||
import type { RemWorkspace } from '../../../shared';
|
||||
import { RemWorkspaceFlavour } from '../../../shared';
|
||||
import {
|
||||
CloudWorkspaceIcon,
|
||||
JoinedWorkspaceIcon,
|
||||
|
||||
@@ -4,11 +4,11 @@ import {
|
||||
ModalWrapper,
|
||||
Tooltip,
|
||||
} from '@affine/component';
|
||||
import { AccessTokenMessage } from '@affine/datacenter';
|
||||
import type { AccessTokenMessage } from '@affine/datacenter';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { HelpIcon, PlusIcon } from '@blocksuite/icons';
|
||||
|
||||
import { RemWorkspace } from '../../../shared';
|
||||
import type { RemWorkspace } from '../../../shared';
|
||||
import { Footer } from '../footer';
|
||||
import { WorkspaceCard } from '../workspace-card';
|
||||
import { LanguageMenu } from './language-menu';
|
||||
|
||||
@@ -2,7 +2,8 @@ import { Button, Menu, MenuItem, styled } from '@affine/component';
|
||||
import { LOCALES } from '@affine/i18n';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import { ArrowDownSmallIcon } from '@blocksuite/icons';
|
||||
import React, { useCallback } from 'react';
|
||||
import type React from 'react';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
const LanguageMenuContent: React.FC = () => {
|
||||
const { i18n } = useTranslation();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react';
|
||||
import type React from 'react';
|
||||
|
||||
import { useBlockSuiteWorkspaceName } from '../../../../hooks/use-blocksuite-workspace-name';
|
||||
import { RemWorkspace } from '../../../../shared';
|
||||
import type { RemWorkspace } from '../../../../shared';
|
||||
import { WorkspaceAvatar } from '../../workspace-avatar';
|
||||
import { SelectorWrapper, WorkspaceName } from './styles';
|
||||
|
||||
|
||||
@@ -10,14 +10,15 @@ import {
|
||||
SearchIcon,
|
||||
SettingsIcon,
|
||||
} from '@blocksuite/icons';
|
||||
import { PageMeta } from '@blocksuite/store';
|
||||
import type { PageMeta } from '@blocksuite/store';
|
||||
import Link from 'next/link';
|
||||
import { useRouter } from 'next/router';
|
||||
import React, { useCallback, useMemo, useState } from 'react';
|
||||
import type React from 'react';
|
||||
import { useCallback, useMemo, useState } from 'react';
|
||||
|
||||
import { useSidebarStatus } from '../../../hooks/affine/use-sidebar-status';
|
||||
import { usePageMeta } from '../../../hooks/use-page-meta';
|
||||
import { RemWorkspace } from '../../../shared';
|
||||
import type { RemWorkspace } from '../../../shared';
|
||||
import { SidebarSwitch } from '../../affine/sidebar-switch';
|
||||
import {
|
||||
StyledLink,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { useSetAtom } from 'jotai';
|
||||
import React, { ReactNode } from 'react';
|
||||
import type { ReactNode } from 'react';
|
||||
import type React from 'react';
|
||||
|
||||
import { openQuickSearchModalAtom } from '../../../atoms';
|
||||
import Header from '../../blocksuite/header/header';
|
||||
|
||||
Reference in New Issue
Block a user