There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
TypeScript appcrdteditorelectronknowledge-basemarkdownmironotesnotionnotion-alternativerustrust-langrust-languagetabletableviewwhiteboardwikiworkspace
fix(core): add toast message (#3847)
Noothan am2a5ef04397dc
diff --git a/apps/core/src/components/pure/trash-button-group/index.tsx b/apps/core/src/components/pure/trash-button-group/index.tsxindex c3fade095f..068968ebde 100644--- a/apps/core/src/components/pure/trash-button-group/index.tsx+++ b/apps/core/src/components/pure/trash-button-group/index.tsx@@ -11,6 +11,7 @@ import { useCallback, useState } from 'react';import { useBlockSuiteMetaHelper } from '../../../hooks/affine/use-block-suite-meta-helper';import { useCurrentWorkspace } from '../../../hooks/current/use-current-workspace';import { useNavigateHelper } from '../../../hooks/use-navigate-helper';+import { toast } from '../../../utils';import { buttonContainer, group } from './styles.css';export const TrashButtonGroup = () => {@@ -37,6 +38,7 @@ export const TrashButtonGroup = () => {type="primary"onClick={() => {restoreFromTrash(pageId);+ toast(t['restored']({ title: pageMeta.title || 'Untitled' }));}}size="large">@@ -63,7 +65,8 @@ export const TrashButtonGroup = () => {onConfirm={useCallback(() => {jumpToSubPath(workspace.id, WorkspaceSubPath.ALL);blockSuiteWorkspace.removePage(pageId);- }, [blockSuiteWorkspace, jumpToSubPath, pageId, workspace.id])}+ toast(t['Permanently deleted']());+ }, [blockSuiteWorkspace, jumpToSubPath, pageId, workspace.id, t])}onCancel={() => {setOpen(false);}}