feat: refactor the usage of toast (#1699)

This commit is contained in:
Qi
2023-03-27 13:24:14 +08:00
committed by GitHub
parent 66dec34209
commit 449ffbc73f
14 changed files with 60 additions and 44 deletions

View File

@@ -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;

View File

@@ -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';