|
@@ -24,18 +24,21 @@ type CommonProps = {
|
|
|
|
|
|
|
|
type SubNavButtonsSubstanceProps= CommonProps & {
|
|
type SubNavButtonsSubstanceProps= CommonProps & {
|
|
|
pageId: string,
|
|
pageId: string,
|
|
|
|
|
+ shareLinkId?: string | null,
|
|
|
revisionId: string,
|
|
revisionId: string,
|
|
|
pageInfo: IPageInfoAll,
|
|
pageInfo: IPageInfoAll,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const SubNavButtonsSubstance = (props: SubNavButtonsSubstanceProps): JSX.Element => {
|
|
const SubNavButtonsSubstance = (props: SubNavButtonsSubstanceProps): JSX.Element => {
|
|
|
const {
|
|
const {
|
|
|
- pageInfo, pageId, isCompactMode, disableSeenUserInfoPopover, showPageControlDropdown, additionalMenuItemRenderer,
|
|
|
|
|
|
|
+ pageInfo,
|
|
|
|
|
+ pageId, shareLinkId,
|
|
|
|
|
+ isCompactMode, disableSeenUserInfoPopover, showPageControlDropdown, additionalMenuItemRenderer,
|
|
|
} = props;
|
|
} = props;
|
|
|
|
|
|
|
|
const { data: isGuestUser } = useIsGuestUser();
|
|
const { data: isGuestUser } = useIsGuestUser();
|
|
|
|
|
|
|
|
- const { mutate: mutatePageInfo } = useSWRxPageInfo(pageId);
|
|
|
|
|
|
|
+ const { mutate: mutatePageInfo } = useSWRxPageInfo(pageId, shareLinkId);
|
|
|
|
|
|
|
|
const { data: bookmarkInfo, mutate: mutateBookmarkInfo } = useSWRBookmarkInfo(pageId);
|
|
const { data: bookmarkInfo, mutate: mutateBookmarkInfo } = useSWRBookmarkInfo(pageId);
|
|
|
|
|
|
|
@@ -129,13 +132,14 @@ const SubNavButtonsSubstance = (props: SubNavButtonsSubstanceProps): JSX.Element
|
|
|
|
|
|
|
|
type SubNavButtonsProps= CommonProps & {
|
|
type SubNavButtonsProps= CommonProps & {
|
|
|
pageId: string,
|
|
pageId: string,
|
|
|
|
|
+ shareLinkId?: string | null,
|
|
|
revisionId?: string | null,
|
|
revisionId?: string | null,
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
export const SubNavButtons = (props: SubNavButtonsProps): JSX.Element => {
|
|
export const SubNavButtons = (props: SubNavButtonsProps): JSX.Element => {
|
|
|
- const { pageId, revisionId } = props;
|
|
|
|
|
|
|
+ const { pageId, shareLinkId, revisionId } = props;
|
|
|
|
|
|
|
|
- const { data: pageInfo, error } = useSWRxPageInfo(pageId ?? null);
|
|
|
|
|
|
|
+ const { data: pageInfo, error } = useSWRxPageInfo(pageId ?? null, shareLinkId);
|
|
|
|
|
|
|
|
if (revisionId == null || error != null) {
|
|
if (revisionId == null || error != null) {
|
|
|
return <></>;
|
|
return <></>;
|