mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00: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 },
|
||||
currentPage,
|
||||
} = props;
|
||||
const { isSharedPage } = useIsSharedPage(
|
||||
workspaceId,
|
||||
currentPage.spaceDoc.guid
|
||||
);
|
||||
const { isSharedPage } = useIsSharedPage(workspaceId, currentPage.id);
|
||||
|
||||
return (
|
||||
<Menu
|
||||
|
||||
@@ -80,7 +80,7 @@ export const AffineSharePage = (props: ShareMenuProps) => {
|
||||
changeShare,
|
||||
currentShareMode,
|
||||
disableShare,
|
||||
} = useIsSharedPage(workspaceId, currentPage.spaceDoc.guid);
|
||||
} = useIsSharedPage(workspaceId, currentPage.id);
|
||||
const currentPageMode = useAtomValue(currentModeAtom);
|
||||
|
||||
const defaultMode = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user