From 41c68365ff90e6ad04311e8b3ac9b52bff364bb1 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 23 Apr 2026 10:37:22 +0200 Subject: [PATCH] [Glitch] Fix minor collection bugs Port 540042dfe3186c52237cde3562b40f50eeb75be9 to glitch-soc Signed-off-by: Claire --- .../features/collections/components/collection_lockup.tsx | 4 ++-- .../glitch/features/collections/editor/details.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/features/collections/components/collection_lockup.tsx b/app/javascript/flavours/glitch/features/collections/components/collection_lockup.tsx index 0b1d711290..03afe7c5cd 100644 --- a/app/javascript/flavours/glitch/features/collections/components/collection_lockup.tsx +++ b/app/javascript/flavours/glitch/features/collections/components/collection_lockup.tsx @@ -27,10 +27,10 @@ export const AvatarGrid: React.FC<{ sensitive ? classes.avatarGridSensitive : null, )} > - {avatarIds.map((id) => ( + {avatarIds.map((id, index) => ( { [dispatch], ); + const accountId = useCurrentAccountId(); + const { acct: currentUserName } = useAccount(accountId) ?? {}; + const handleSubmit = useCallback( (e: React.FormEvent) => { e.preventDefault(); @@ -128,7 +133,7 @@ export const CollectionDetails: React.FC = () => { }), ).then((result) => { if (isFulfilled(result)) { - history.replace(`/collections`); + history.replace(`/@${currentUserName}/collections`); history.push(`/collections/${result.payload.collection.id}`, { newCollection: true, }); @@ -146,6 +151,7 @@ export const CollectionDetails: React.FC = () => { dispatch, history, accountIds, + currentUserName, ], );