From 3916132f2fe01e5c8db500b08fb5e068eb1beff2 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Fri, 17 Apr 2026 10:50:35 +0200 Subject: [PATCH] [Glitch] Remove "View other collections from this user" from collection menu Port e571994b5c6700cd896795f792978a709a09c5ce to glitch-soc Signed-off-by: Claire --- .../components/collection_menu.tsx | 31 +++---------------- 1 file changed, 5 insertions(+), 26 deletions(-) diff --git a/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx b/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx index 37e518b9aa..b4ab4770af 100644 --- a/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx +++ b/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx @@ -2,8 +2,6 @@ import { useCallback, useMemo } from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import { matchPath } from 'react-router'; - import { showAlert } from '@/flavours/glitch/actions/alerts'; import { initBlockModal } from '@/flavours/glitch/actions/blocks'; import { useAccount } from '@/flavours/glitch/hooks/useAccount'; @@ -35,10 +33,6 @@ const messages = defineMessages({ id: 'collections.copy_link_confirmation', defaultMessage: 'Copied collection link to clipboard', }, - viewOtherCollections: { - id: 'collections.view_other_collections_by_user', - defaultMessage: 'View other collections by this user', - }, delete: { id: 'collections.delete_collection', defaultMessage: 'Delete collection', @@ -168,25 +162,11 @@ export const CollectionMenu: React.FC<{ return ownerItems; } } else { - const nonOwnerItems: MenuItem[] = [viewCollectionItem, ...shareItems]; - - if (context !== 'notifications' && ownerAccount) { - const featuredCollectionsPath = `/@${ownerAccount.acct}/featured`; - // Don't show menu link to featured collections while on that very page - if ( - !matchPath(location.pathname, { - path: featuredCollectionsPath, - exact: true, - }) - ) { - nonOwnerItems.push({ - text: intl.formatMessage(messages.viewOtherCollections), - to: featuredCollectionsPath, - }); - } - } - - nonOwnerItems.push(null); + const nonOwnerItems: MenuItem[] = [ + viewCollectionItem, + ...shareItems, + null, + ]; // Collection notifications already have a prominent 'Remove me' button if (currentAccountInCollection && context !== 'notifications') { @@ -218,7 +198,6 @@ export const CollectionMenu: React.FC<{ dispatch, openDeleteConfirmation, context, - ownerAccount, currentAccountInCollection, openReportModal, openBlockModal,