mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor: use useRouterHelper (#1422)
Co-authored-by: himself65 <himself65@outlook.com>
This commit is contained in:
@@ -24,6 +24,19 @@ export function useRouterHelper(router: NextRouter) {
|
||||
},
|
||||
});
|
||||
},
|
||||
jumpToPublicWorkspacePage: (
|
||||
workspaceId: string,
|
||||
pageId: string,
|
||||
logic: RouteLogic = RouteLogic.PUSH
|
||||
) => {
|
||||
return router[logic]({
|
||||
pathname: `/public-workspace/[workspaceId]/[pageId]`,
|
||||
query: {
|
||||
workspaceId,
|
||||
pageId,
|
||||
},
|
||||
});
|
||||
},
|
||||
jumpToSubPath: (
|
||||
workspaceId: string,
|
||||
subPath: WorkspaceSubPath,
|
||||
|
||||
Reference in New Issue
Block a user