mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 12:55:00 +00:00
feat(core): open desktop directly in subscription landing page (#6661)
This commit is contained in:
@@ -155,6 +155,14 @@ export function useNavigateHelper() {
|
||||
[navigate]
|
||||
);
|
||||
|
||||
const openInApp = useCallback(
|
||||
(schema: string, path: string) => {
|
||||
const encodedUrl = encodeURIComponent(`${schema}://${path}`);
|
||||
return navigate(`/open-app/url?schema=${schema}&url=${encodedUrl}`);
|
||||
},
|
||||
[navigate]
|
||||
);
|
||||
|
||||
return useMemo(
|
||||
() => ({
|
||||
jumpToPage,
|
||||
@@ -169,6 +177,7 @@ export function useNavigateHelper() {
|
||||
jumpToCollections,
|
||||
jumpToTags,
|
||||
jumpToTag,
|
||||
openInApp,
|
||||
}),
|
||||
[
|
||||
jumpToPage,
|
||||
@@ -183,6 +192,7 @@ export function useNavigateHelper() {
|
||||
jumpToCollections,
|
||||
jumpToTags,
|
||||
jumpToTag,
|
||||
openInApp,
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user