mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
fix(core): unable to create share page link (#5175)
For some reasons, our `spaceDoc.guid` and `page.id` may not necessarily be the same, so we switched to using the more accurate `page.id`.
This commit is contained in:
@@ -73,10 +73,7 @@ const CloudShareMenu = (props: ShareMenuProps) => {
|
|||||||
workspace: { id: workspaceId },
|
workspace: { id: workspaceId },
|
||||||
currentPage,
|
currentPage,
|
||||||
} = props;
|
} = props;
|
||||||
const { isSharedPage } = useIsSharedPage(
|
const { isSharedPage } = useIsSharedPage(workspaceId, currentPage.id);
|
||||||
workspaceId,
|
|
||||||
currentPage.spaceDoc.guid
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Menu
|
<Menu
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ export const AffineSharePage = (props: ShareMenuProps) => {
|
|||||||
changeShare,
|
changeShare,
|
||||||
currentShareMode,
|
currentShareMode,
|
||||||
disableShare,
|
disableShare,
|
||||||
} = useIsSharedPage(workspaceId, currentPage.spaceDoc.guid);
|
} = useIsSharedPage(workspaceId, currentPage.id);
|
||||||
const currentPageMode = useAtomValue(currentModeAtom);
|
const currentPageMode = useAtomValue(currentModeAtom);
|
||||||
|
|
||||||
const defaultMode = useMemo(() => {
|
const defaultMode = useMemo(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user