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.
This commit is contained in:
fourdim
2024-03-05 18:51:39 +00:00
parent dce3b59c52
commit 0ff1e8d2f7
@@ -42,11 +42,11 @@ export const usePageHelper = (blockSuiteWorkspace: BlockSuiteWorkspace) => {
const { showImportModal } = await import('@blocksuite/blocks'); const { showImportModal } = await import('@blocksuite/blocks');
const onSuccess = ( const onSuccess = (
pageIds: string[], pageIds: string[],
options: { isWorkspaceFile: boolean } options: { isWorkspaceFile: boolean; importedCount: number }
) => { ) => {
toast( toast(
`Successfully imported ${pageIds.length} Page${ `Successfully imported ${options.importedCount} Page${
pageIds.length > 1 ? 's' : '' options.importedCount > 1 ? 's' : ''
}.` }.`
); );
if (options.isWorkspaceFile) { if (options.isWorkspaceFile) {