mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(core): wrong fetch injected to snapshot downloader (#9460)
This commit is contained in:
@@ -206,6 +206,7 @@ const Dialog = ({
|
||||
loading={disabled}
|
||||
disabled={disabled}
|
||||
onClick={handleImportToSelectedWorkspace}
|
||||
data-testid="import-template-to-workspace-btn"
|
||||
>
|
||||
{selectedWorkspaceName &&
|
||||
t['com.affine.import-template.dialog.createDocToWorkspace']({
|
||||
|
||||
@@ -16,11 +16,15 @@ export const Component = () => {
|
||||
const [searchParams] = useSearchParams();
|
||||
const { jumpToIndex } = useNavigateHelper();
|
||||
useEffect(() => {
|
||||
globalDialogService.open('import-template', {
|
||||
const id = globalDialogService.open('import-template', {
|
||||
templateName: searchParams.get('name') ?? '',
|
||||
templateMode: (searchParams.get('mode') as DocMode) ?? 'page',
|
||||
snapshotUrl: searchParams.get('snapshotUrl') ?? '',
|
||||
});
|
||||
|
||||
return () => {
|
||||
globalDialogService.close(id);
|
||||
};
|
||||
}, [globalDialogService, jumpToIndex, searchParams]);
|
||||
// no ui for this route, just open the dialog
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user