|
@@ -1,4 +1,4 @@
|
|
|
-import React from 'react';
|
|
|
|
|
|
|
+import React, { useMemo } from 'react';
|
|
|
import PropTypes from 'prop-types';
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import { withTranslation } from 'react-i18next';
|
|
import { withTranslation } from 'react-i18next';
|
|
@@ -71,12 +71,16 @@ const PagePathNav = ({ pageId, pagePath, isPageForbidden }) => {
|
|
|
const PageReactionButtons = ({ appContainer, pageContainer }) => {
|
|
const PageReactionButtons = ({ appContainer, pageContainer }) => {
|
|
|
|
|
|
|
|
const {
|
|
const {
|
|
|
- pageId, isLiked, pageUser,
|
|
|
|
|
|
|
+ pageId, isLiked, pageUser, shareLinkId,
|
|
|
} = pageContainer.state;
|
|
} = pageContainer.state;
|
|
|
|
|
|
|
|
|
|
+ const isSharedPage = useMemo(() => {
|
|
|
|
|
+ return shareLinkId != null;
|
|
|
|
|
+ }, [shareLinkId]);
|
|
|
|
|
+
|
|
|
return (
|
|
return (
|
|
|
<>
|
|
<>
|
|
|
- {pageUser == null && (
|
|
|
|
|
|
|
+ {pageUser == null && !isSharedPage && (
|
|
|
<span className="mr-2">
|
|
<span className="mr-2">
|
|
|
<LikeButton pageId={pageId} isLiked={isLiked} />
|
|
<LikeButton pageId={pageId} isLiked={isLiked} />
|
|
|
</span>
|
|
</span>
|