Don't display 'view collection' menu item on collection page (#39694)
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
parent
06d64519da
commit
7db2a99504
@ -163,11 +163,7 @@ export const CollectionMenu: React.FC<{
|
|||||||
return ownerItems;
|
return ownerItems;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const nonOwnerItems: MenuItem[] = [
|
const nonOwnerItems: MenuItem[] = [...shareItems, null];
|
||||||
viewCollectionItem,
|
|
||||||
...shareItems,
|
|
||||||
null,
|
|
||||||
];
|
|
||||||
|
|
||||||
// Collection notifications already have a prominent 'Remove me' button
|
// Collection notifications already have a prominent 'Remove me' button
|
||||||
if (currentAccountInCollection && context !== 'notifications') {
|
if (currentAccountInCollection && context !== 'notifications') {
|
||||||
@ -189,6 +185,10 @@ export const CollectionMenu: React.FC<{
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (context !== 'collection') {
|
||||||
|
return [viewCollectionItem, ...nonOwnerItems];
|
||||||
|
}
|
||||||
|
|
||||||
return nonOwnerItems;
|
return nonOwnerItems;
|
||||||
}
|
}
|
||||||
}, [
|
}, [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user