|
|
@@ -249,6 +249,7 @@ const PageControlsSubstance = (props: PageControlsSubstanceProps): JSX.Element =
|
|
|
MenuItemType.REVERT,
|
|
|
];
|
|
|
|
|
|
+ const _isIPageInfoForOperation = isIPageInfoForOperation(pageInfo);
|
|
|
const isViewMode = editorMode === EditorMode.View;
|
|
|
|
|
|
return (
|
|
|
@@ -256,18 +257,18 @@ const PageControlsSubstance = (props: PageControlsSubstanceProps): JSX.Element =
|
|
|
{ isDeviceLargerThanMd && (
|
|
|
<SearchButton />
|
|
|
)}
|
|
|
- {revisionId != null && !isViewMode && isIPageInfoForOperation(pageInfo) && (
|
|
|
+ {revisionId != null && !isViewMode && _isIPageInfoForOperation && (
|
|
|
<Tags
|
|
|
onClickEditTagsButton={onClickEditTagsButton}
|
|
|
/>
|
|
|
)}
|
|
|
- {revisionId != null && isIPageInfoForOperation(pageInfo) && (
|
|
|
+ {revisionId != null && _isIPageInfoForOperation && (
|
|
|
<SubscribeButton
|
|
|
status={pageInfo.subscriptionStatus}
|
|
|
onClick={subscribeClickhandler}
|
|
|
/>
|
|
|
)}
|
|
|
- {revisionId != null && isIPageInfoForOperation(pageInfo) && (
|
|
|
+ {revisionId != null && _isIPageInfoForOperation && (
|
|
|
<LikeButtons
|
|
|
onLikeClicked={likeClickhandler}
|
|
|
sumOfLikers={sumOfLikers}
|
|
|
@@ -275,7 +276,7 @@ const PageControlsSubstance = (props: PageControlsSubstanceProps): JSX.Element =
|
|
|
likers={likers}
|
|
|
/>
|
|
|
)}
|
|
|
- {revisionId != null && isIPageInfoForOperation(pageInfo) && (
|
|
|
+ {revisionId != null && _isIPageInfoForOperation && (
|
|
|
<BookmarkButtons
|
|
|
pageId={pageId}
|
|
|
isBookmarked={pageInfo.isBookmarked}
|
|
|
@@ -289,7 +290,7 @@ const PageControlsSubstance = (props: PageControlsSubstanceProps): JSX.Element =
|
|
|
disabled={disableSeenUserInfoPopover}
|
|
|
/>
|
|
|
) }
|
|
|
- { showPageControlDropdown && isIPageInfoForOperation(pageInfo) && (
|
|
|
+ { showPageControlDropdown && _isIPageInfoForOperation && (
|
|
|
<PageItemControl
|
|
|
alignEnd
|
|
|
pageId={pageId}
|