mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-17 18:16:15 +08:00
feat: refactor the usage of toast (#1699)
This commit is contained in:
+2
-1
@@ -6,7 +6,6 @@ import {
|
||||
MenuItem,
|
||||
Tooltip,
|
||||
} from '@affine/component';
|
||||
import { toast } from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import {
|
||||
DeletePermanentlyIcon,
|
||||
@@ -21,6 +20,8 @@ import type { PageMeta } from '@blocksuite/store';
|
||||
import type React from 'react';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { toast } from '../../../../utils';
|
||||
|
||||
export type OperationCellProps = {
|
||||
pageMeta: PageMeta;
|
||||
onOpenPageInNewTab: (pageId: string) => void;
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
TableHead,
|
||||
TableRow,
|
||||
} from '@affine/component';
|
||||
import { Content, IconButton, toast, Tooltip } from '@affine/component';
|
||||
import { Content, IconButton, Tooltip } from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import {
|
||||
EdgelessIcon,
|
||||
@@ -29,6 +29,7 @@ import {
|
||||
usePageMetaHelper,
|
||||
} from '../../../../hooks/use-page-meta';
|
||||
import type { BlockSuiteWorkspace } from '../../../../shared';
|
||||
import { toast } from '../../../../utils';
|
||||
import DateCell from './DateCell';
|
||||
import Empty from './Empty';
|
||||
import { OperationCell, TrashOperationCell } from './OperationCell';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { toast } from '@affine/component';
|
||||
import { assertExists } from '@blocksuite/store';
|
||||
import { useAtomValue, useSetAtom } from 'jotai';
|
||||
import type { CSSProperties } from 'react';
|
||||
@@ -6,6 +5,7 @@ import type { CSSProperties } from 'react';
|
||||
import { workspacePreferredModeAtom } from '../../../../atoms';
|
||||
import { usePageMeta } from '../../../../hooks/use-page-meta';
|
||||
import type { BlockSuiteWorkspace } from '../../../../shared';
|
||||
import { toast } from '../../../../utils';
|
||||
import { StyledEditorModeSwitch } from './style';
|
||||
import { EdgelessSwitchItem, PageSwitchItem } from './switch-items';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
// fixme(himself65): refactor this file
|
||||
import { Confirm, FlexWrapper, Menu, MenuItem } from '@affine/component';
|
||||
import { IconButton } from '@affine/component';
|
||||
import { toast } from '@affine/component';
|
||||
import { useTranslation } from '@affine/i18n';
|
||||
import {
|
||||
DeleteTemporarilyIcon,
|
||||
@@ -25,6 +24,7 @@ import {
|
||||
usePageMeta,
|
||||
usePageMetaHelper,
|
||||
} from '../../../../hooks/use-page-meta';
|
||||
import { toast } from '../../../../utils';
|
||||
|
||||
export const EditorOptionMenu = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
Reference in New Issue
Block a user