mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
chore: sort imports
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { Fragment, useState, useEffect, useCallback } from 'react';
|
||||
import { styled, MuiClickAwayListener } from '@toeverything/components/ui';
|
||||
import { MuiClickAwayListener, styled } from '@toeverything/components/ui';
|
||||
import { services } from '@toeverything/datasource/db-service';
|
||||
import { Fragment, useCallback, useEffect, useState } from 'react';
|
||||
|
||||
import { QuotedContent } from './item/QuotedContent';
|
||||
import { ReplyItem } from './item/ReplyItem';
|
||||
import { ReplyInput } from './item/ReplyInput';
|
||||
import { ReplyItem } from './item/ReplyItem';
|
||||
import { CommentInfo } from './type';
|
||||
|
||||
export const CommentItem = (props: CommentInfo) => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import { useComments } from './use-comments';
|
||||
import { CommentItem } from './CommentItem';
|
||||
import { useComments } from './use-comments';
|
||||
|
||||
type CommentsProps = {
|
||||
activeCommentId: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useMemo } from 'react';
|
||||
import { styled, MuiAvatar as Avatar } from '@toeverything/components/ui';
|
||||
import { MuiAvatar as Avatar, styled } from '@toeverything/components/ui';
|
||||
import { useUserAndSpaces } from '@toeverything/datasource/state';
|
||||
import { getUserDisplayName } from '@toeverything/utils';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
type CommentedByUserProps = {
|
||||
username: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import { DoneIcon } from '@toeverything/components/icons';
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
|
||||
type QuotedContentProps = {
|
||||
content: string;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
useState,
|
||||
useCallback,
|
||||
KeyboardEventHandler,
|
||||
ChangeEvent,
|
||||
} from 'react';
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import {
|
||||
ChangeEvent,
|
||||
KeyboardEventHandler,
|
||||
useCallback,
|
||||
useState,
|
||||
} from 'react';
|
||||
|
||||
export const ReplyInput = (props: any) => {
|
||||
const { onSubmit } = props;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import type { CommentReply } from '@toeverything/datasource/db-service';
|
||||
|
||||
import { CommentContent } from './CommentContent';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { useState, useCallback, useEffect, useMemo } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { services } from '@toeverything/datasource/db-service';
|
||||
import type { Virgo } from '@toeverything/components/editor-core';
|
||||
import { services } from '@toeverything/datasource/db-service';
|
||||
import {
|
||||
useCurrentEditors,
|
||||
useShowSettingsSidebar,
|
||||
} from '@toeverything/datasource/state';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import type { CommentInfo } from './type';
|
||||
|
||||
export const useComments = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type {
|
||||
ReturnEditorBlock,
|
||||
Comment,
|
||||
ReturnEditorBlock,
|
||||
} from '@toeverything/datasource/db-service';
|
||||
|
||||
export const getCommentsFromEditorBlocks = (
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { cloneElement, useMemo, useCallback, type ReactElement } from 'react';
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import {
|
||||
CommentIcon,
|
||||
LayoutIcon,
|
||||
SettingsIcon,
|
||||
} from '@toeverything/components/icons';
|
||||
import { LayoutSettings } from '../Layout';
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import { cloneElement, useCallback, useMemo, type ReactElement } from 'react';
|
||||
import { Comments } from '../Comments';
|
||||
import { useActiveComment } from '../Comments/use-comments';
|
||||
import { LayoutSettings } from '../Layout';
|
||||
import { SettingsPanel } from '../Settings';
|
||||
import { TabItemTitle } from './TabItemTitle';
|
||||
import { useTabs } from './use-tabs';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ListIcon, ListItem, styled } from '@toeverything/components/ui';
|
||||
import type { ReactNode } from 'react';
|
||||
import { styled, ListItem, ListIcon } from '@toeverything/components/ui';
|
||||
|
||||
type TabItemTitleProps = {
|
||||
icon: ReactNode;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useRef, useEffect, useState, useMemo } from 'react';
|
||||
import { useEffect, useMemo, useRef, useState } from 'react';
|
||||
|
||||
function usePrevious<T>(value: T) {
|
||||
const ref = useRef<T>();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { styled, ListItem, Divider, Switch } from '@toeverything/components/ui';
|
||||
import { Divider, ListItem, styled, Switch } from '@toeverything/components/ui';
|
||||
import { useSettings } from './use-settings';
|
||||
|
||||
export const SettingsList = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { styled } from '@toeverything/components/ui';
|
||||
import { SettingsList } from './SettingsList';
|
||||
import { Footer } from './footer';
|
||||
import { SettingsList } from './SettingsList';
|
||||
|
||||
export const SettingsPanel = () => {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import format from 'date-fns/format';
|
||||
import { Typography, styled } from '@toeverything/components/ui';
|
||||
import { styled, Typography } from '@toeverything/components/ui';
|
||||
import { useUserAndSpaces } from '@toeverything/datasource/state';
|
||||
import format from 'date-fns/format';
|
||||
import { usePageLastUpdated, useWorkspaceAndPageId } from '../util';
|
||||
|
||||
export const LastModified = () => {
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
import { MoveToIcon } from '@toeverything/components/icons';
|
||||
import {
|
||||
ListItem,
|
||||
ListIcon,
|
||||
styled,
|
||||
Typography,
|
||||
} from '@toeverything/components/ui';
|
||||
import { ListItem, styled, Typography } from '@toeverything/components/ui';
|
||||
import { LOGOUT_COOKIES, LOGOUT_LOCAL_STORAGE } from '@toeverything/utils';
|
||||
import { getAuth, signOut } from 'firebase/auth';
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { message } from '@toeverything/components/ui';
|
||||
import { useSettingFlags, type SettingFlags } from './use-setting-flags';
|
||||
import { copyToClipboard } from '@toeverything/utils';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useSettingFlags, type SettingFlags } from './use-setting-flags';
|
||||
import {
|
||||
duplicatePage,
|
||||
getPageTitle,
|
||||
exportHtml,
|
||||
exportMarkdown,
|
||||
importWorkspace,
|
||||
exportWorkspace,
|
||||
useWorkspaceAndPageId,
|
||||
// useReadingMode,
|
||||
clearWorkspace,
|
||||
duplicatePage,
|
||||
exportHtml,
|
||||
exportMarkdown,
|
||||
exportWorkspace,
|
||||
getPageTitle,
|
||||
importWorkspace,
|
||||
useWorkspaceAndPageId,
|
||||
} from './util';
|
||||
|
||||
interface BaseSettingItem {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { services } from '@toeverything/datasource/db-service';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
const UNTITLED = 'untitled';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ClipboardParse } from '@toeverything/components/editor-core';
|
||||
import { createEditor } from '@toeverything/components/affine-editor';
|
||||
import { ClipboardParse } from '@toeverything/components/editor-core';
|
||||
import { fileExporter } from './file-exporter';
|
||||
|
||||
interface CreateClipboardParseProps {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
export { duplicatePage } from './duplicate-page';
|
||||
export { exportHtml, exportMarkdown } from './handle-export';
|
||||
export { getPageTitle, usePageLastUpdated } from './get-page-info';
|
||||
export { exportHtml, exportMarkdown } from './handle-export';
|
||||
export {
|
||||
importWorkspace,
|
||||
exportWorkspace,
|
||||
clearWorkspace,
|
||||
exportWorkspace,
|
||||
importWorkspace,
|
||||
} from './inspector-workspace';
|
||||
export { useWorkspaceAndPageId } from './use-workspace-page';
|
||||
export { useReadingMode } from './use-reading-mode';
|
||||
export { useWorkspaceAndPageId } from './use-workspace-page';
|
||||
|
||||
Reference in New Issue
Block a user