mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-29 08:09:52 +08:00
fix(core): add toDocSearchParams for better typeschecking doc search params (#11383)
This commit is contained in:
+2
-2
@@ -7,7 +7,7 @@ import {
|
||||
DocLinksService,
|
||||
type Link,
|
||||
} from '@affine/core/modules/doc-link';
|
||||
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
||||
import { toDocSearchParams } from '@affine/core/modules/navigation/utils';
|
||||
import { GlobalSessionStateService } from '@affine/core/modules/storage';
|
||||
import { WorkbenchLink } from '@affine/core/modules/workbench';
|
||||
import {
|
||||
@@ -144,7 +144,7 @@ const usePreviewExtensions = () => {
|
||||
const pageId = data.pageId;
|
||||
if (!pageId) return <span />;
|
||||
|
||||
const params = toURLSearchParams(data.params);
|
||||
const params = toDocSearchParams(data.params);
|
||||
|
||||
if (workspaceService.workspace.openOptions.isSharedMode) {
|
||||
return (
|
||||
|
||||
@@ -18,7 +18,7 @@ import { EditorService } from '@affine/core/modules/editor';
|
||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||
import { JournalService } from '@affine/core/modules/journal';
|
||||
import { toURLSearchParams } from '@affine/core/modules/navigation';
|
||||
import { toDocSearchParams } from '@affine/core/modules/navigation';
|
||||
import { useInsidePeekView } from '@affine/core/modules/peek-view';
|
||||
import { PeekViewService } from '@affine/core/modules/peek-view/services/peek-view';
|
||||
import { MemberSearchService } from '@affine/core/modules/permissions';
|
||||
@@ -121,7 +121,7 @@ const usePatchSpecs = (mode: DocMode) => {
|
||||
|
||||
// title alias
|
||||
const title = data.title;
|
||||
const params = toURLSearchParams(data.params);
|
||||
const params = toDocSearchParams(data.params);
|
||||
|
||||
if (workspaceService.workspace.openOptions.isSharedMode) {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user