From 0ff1e8d2f7811d757099c919540fe29fbd673820 Mon Sep 17 00:00:00 2001 From: fourdim <59462000+fourdim@users.noreply.github.com> Date: Tue, 5 Mar 2024 18:51:39 +0000 Subject: [PATCH] fix: breaking function signature on showImportModal onSuceessHandler (#6011) This will fix the breaking change introduced in https://github.com/toeverything/blocksuite/commit/da781df4732a2fbcc1bd82d823cb1390918ada0b This should be merged after the next BlockSuite bump. --- .../components/blocksuite/block-suite-page-list/utils.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/core/src/components/blocksuite/block-suite-page-list/utils.tsx b/packages/frontend/core/src/components/blocksuite/block-suite-page-list/utils.tsx index cc7a6e380e..6817535ee9 100644 --- a/packages/frontend/core/src/components/blocksuite/block-suite-page-list/utils.tsx +++ b/packages/frontend/core/src/components/blocksuite/block-suite-page-list/utils.tsx @@ -42,11 +42,11 @@ export const usePageHelper = (blockSuiteWorkspace: BlockSuiteWorkspace) => { const { showImportModal } = await import('@blocksuite/blocks'); const onSuccess = ( pageIds: string[], - options: { isWorkspaceFile: boolean } + options: { isWorkspaceFile: boolean; importedCount: number } ) => { toast( - `Successfully imported ${pageIds.length} Page${ - pageIds.length > 1 ? 's' : '' + `Successfully imported ${options.importedCount} Page${ + options.importedCount > 1 ? 's' : '' }.` ); if (options.isWorkspaceFile) {