remove redundancy when buttons are already on page
This commit is contained in:
parent
3a6bddc588
commit
4ef8247985
2 changed files with 22 additions and 14 deletions
|
@ -48,6 +48,7 @@ type Props = {
|
|||
isSubscribed: boolean,
|
||||
doChannelSubscribe: (SubscriptionArgs) => void,
|
||||
doChannelUnsubscribe: (SubscriptionArgs) => void,
|
||||
isChannelPage: boolean,
|
||||
};
|
||||
|
||||
function ClaimMenuList(props: Props) {
|
||||
|
@ -76,6 +77,7 @@ function ClaimMenuList(props: Props) {
|
|||
isSubscribed,
|
||||
doChannelSubscribe,
|
||||
doChannelUnsubscribe,
|
||||
isChannelPage = false,
|
||||
} = props;
|
||||
const incognito = channelUri && !(channelUri.includes('@'));
|
||||
const signingChannel = claim && (claim.signing_channel || claim);
|
||||
|
@ -186,7 +188,7 @@ function ClaimMenuList(props: Props) {
|
|||
</MenuButton>
|
||||
<MenuList className="menu__list">
|
||||
|
||||
{!incognito && (!claimIsMine ? (
|
||||
{!incognito && (!claimIsMine ? (!isChannelPage &&
|
||||
<MenuItem className="comment__menu-option" onSelect={handleFollow}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.SUBSCRIBE} />
|
||||
|
@ -201,12 +203,15 @@ function ClaimMenuList(props: Props) {
|
|||
</div>
|
||||
</MenuItem>
|
||||
))}
|
||||
|
||||
{!isChannelPage && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleSupport}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.LBC} />
|
||||
{__('Support')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{hasExperimentalUi && (
|
||||
<>
|
||||
|
@ -289,12 +294,14 @@ function ClaimMenuList(props: Props) {
|
|||
</>
|
||||
) : (
|
||||
<>
|
||||
{!isChannelPage && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleEdit}>
|
||||
<div className="menu__link">
|
||||
<Icon aria-hidden icon={ICONS.EDIT} />
|
||||
{__('Edit')}
|
||||
</div>
|
||||
</MenuItem>
|
||||
)}
|
||||
|
||||
{showDelete && (
|
||||
<MenuItem className="comment__menu-option" onSelect={handleDelete}>
|
||||
|
|
|
@ -191,7 +191,8 @@ function ChannelPage(props: Props) {
|
|||
{!channelIsBlackListed && <ShareButton uri={uri} />}
|
||||
{!(isBlocked || isMuted) && <ClaimSupportButton uri={uri} />}
|
||||
{!(isBlocked || isMuted) && (!channelIsBlackListed || isSubscribed) && <SubscribeButton uri={permanentUrl} />}
|
||||
<ClaimMenuList uri={claim.permanent_url} channelUri={claim.permanent_url} inline />
|
||||
{/* TODO: add channel collections <ClaimCollectionAddButton uri={uri} fileAction /> */}
|
||||
<ClaimMenuList uri={claim.permanent_url} channelUri={claim.permanent_url} inline isChannelPage />
|
||||
</div>
|
||||
{cover && <img className={classnames('channel-cover__custom')} src={cover} />}
|
||||
<div className="channel__primary-info">
|
||||
|
|
Loading…
Reference in a new issue