chore: sort imports

This commit is contained in:
DarkSky
2022-08-13 03:16:26 +08:00
parent 5462b1707f
commit 754b2581cd
198 changed files with 839 additions and 917 deletions
@@ -1,5 +1,5 @@
import { BoardViewIcon, DocViewIcon } from '@toeverything/components/icons';
import { styled } from '@toeverything/components/ui';
import { DocViewIcon, BoardViewIcon } from '@toeverything/components/icons';
import { DocMode } from './type';
interface StatusIconProps {
@@ -1,6 +1,6 @@
import type { DocMode } from './type';
import { styled } from '@toeverything/components/ui';
import { StatusIcon } from './StatusIcon';
import type { DocMode } from './type';
interface StatusTrackProps {
mode: DocMode;
@@ -1,5 +1,5 @@
import { useLocation, useParams, useNavigate } from 'react-router-dom';
import { styled } from '@toeverything/components/ui';
import { useLocation, useNavigate, useParams } from 'react-router-dom';
import { StatusText } from './StatusText';
import { StatusTrack } from './StatusTrack';
import { DocMode } from './type';
+10 -11
View File
@@ -1,24 +1,23 @@
import { useNavigate, useParams, useLocation } from 'react-router-dom';
import MenuIconBak from '@mui/icons-material/Menu';
import {
useUserAndSpaces,
useShowSpaceSidebar,
useShowSettingsSidebar,
} from '@toeverything/datasource/state';
import { ListIcon, LogoLink, SpaceIcon } from '@toeverything/components/common';
import { SideBarViewIcon } from '@toeverything/components/icons';
import {
MuiIconButton as IconButton,
styled,
Tooltip,
useTheme,
} from '@toeverything/components/ui';
import { SideBarViewIcon } from '@toeverything/components/icons';
import { LogoLink, ListIcon, SpaceIcon } from '@toeverything/components/common';
import { useFlag } from '@toeverything/datasource/feature-flags';
import {
useShowSettingsSidebar,
useShowSpaceSidebar,
useUserAndSpaces,
} from '@toeverything/datasource/state';
import { useLocation, useNavigate, useParams } from 'react-router-dom';
import { PageHistoryPortal } from './PageHistoryPortal';
import { PageSharePortal } from './PageSharePortal';
import { PageSettingPortal } from './PageSettingPortal';
import { PageSharePortal } from './PageSharePortal';
import { CurrentPageTitle } from './Title';
import { UserMenuIcon } from './user-menu-icon';
import { useFlag } from '@toeverything/datasource/feature-flags';
function hideAffineHeader(pathname: string): boolean {
return ['/', '/login', '/error/workspace', '/error/404', '/ui'].includes(
@@ -1,19 +1,19 @@
import { useMemo } from 'react';
import { IconButton, styled } from '@toeverything/components/ui';
import {
LogoIcon,
SideBarViewIcon,
SearchIcon,
SideBarViewCloseIcon,
SideBarViewIcon,
} from '@toeverything/components/icons';
import { IconButton, styled } from '@toeverything/components/ui';
import {
useShowSettingsSidebar,
useLocalTrigger,
useShowSettingsSidebar,
} from '@toeverything/datasource/state';
import { EditorBoardSwitcher } from './EditorBoardSwitcher';
import { fsApiSupported, FileSystem } from './FileSystem';
import { FileSystem, fsApiSupported } from './FileSystem';
import { CurrentPageTitle } from './Title';
export const LayoutHeader = () => {
@@ -1,22 +1,22 @@
import { useState, MouseEvent, useCallback, useEffect } from 'react';
import { services } from '@toeverything/datasource/db-service';
import { useParams, useNavigate } from 'react-router-dom';
import { useCallback, useEffect, useState } from 'react';
import { useNavigate, useParams } from 'react-router-dom';
import { copyToClipboard } from '@toeverything/utils';
import { MoreIcon } from '@toeverything/components/icons';
import {
MuiSnackbar as Snackbar,
Popover,
ListButton,
MuiDivider as Divider,
MuiSnackbar as Snackbar,
MuiSwitch as Switch,
Popover,
styled,
} from '@toeverything/components/ui';
import { useUserAndSpaces } from '@toeverything/datasource/state';
import format from 'date-fns/format';
import { useFlag } from '@toeverything/datasource/feature-flags';
import { PageBlock } from './types';
import { useUserAndSpaces } from '@toeverything/datasource/state';
import { copyToClipboard } from '@toeverything/utils';
import format from 'date-fns/format';
import { FileExporter } from './file-exporter/file-exporter';
import { PageBlock } from './types';
const PageSettingPortalContainer = styled('div')({
width: '320p',
padding: '15px',
@@ -1,18 +1,17 @@
import style9 from 'style9';
import LanguageIcon from '@mui/icons-material/Language';
import { useState, MouseEvent } from 'react';
import InsertLinkIcon from '@mui/icons-material/InsertLink';
import LanguageIcon from '@mui/icons-material/Language';
import ShareIcon from '@mui/icons-material/Share';
import {
MuiSnackbar as Snackbar,
MuiButton as Button,
MuiDivider as Divider,
MuiInputBase as InputBase,
MuiPaper as Paper,
MuiSnackbar as Snackbar,
MuiSwitch as Switch,
Popover,
} from '@toeverything/components/ui';
import { copyToClipboard } from '@toeverything/utils';
import { useState } from 'react';
import style9 from 'style9';
const styles = style9.create({
pageShareBox: {
+2 -2
View File
@@ -1,6 +1,6 @@
import { useEffect, useState, useCallback } from 'react';
import { styled, Typography } from '@toeverything/components/ui';
import { useCallback, useEffect, useState } from 'react';
import { useParams } from 'react-router-dom';
import { Typography, styled } from '@toeverything/components/ui';
import { services } from '@toeverything/datasource/db-service';
import { useUserAndSpaces } from '@toeverything/datasource/state';
@@ -1,4 +1,3 @@
import { PageBlock } from '../types';
import TurndownService from 'turndown';
const FileExporter = {
exportFile: (filename: string, text: string, format: string) => {
@@ -1,14 +1,14 @@
import { useMemo } from 'react';
import { getAuth, signOut } from 'firebase/auth';
import { useMemo } from 'react';
import { LOGOUT_COOKIES, LOGOUT_LOCAL_STORAGE } from '@toeverything/utils';
import { useUserAndSpaces } from '@toeverything/datasource/state';
import {
MuiDivider as Divider,
MuiList as List,
MuiListItem as ListItem,
MuiListItemText as ListItemText,
} from '@toeverything/components/ui';
import { useUserAndSpaces } from '@toeverything/datasource/state';
import { LOGOUT_COOKIES, LOGOUT_LOCAL_STORAGE } from '@toeverything/utils';
export const UserMenuList = () => {
const { user } = useUserAndSpaces();