From 540042dfe3186c52237cde3562b40f50eeb75be9 Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 23 Apr 2026 10:37:22 +0200 Subject: [PATCH] Fix minor collection bugs (#38785) --- .../features/collections/components/collection_lockup.tsx | 4 ++-- .../mastodon/features/collections/editor/details.tsx | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/collections/components/collection_lockup.tsx b/app/javascript/mastodon/features/collections/components/collection_lockup.tsx index d72400cb8f..45cb59b089 100644 --- a/app/javascript/mastodon/features/collections/components/collection_lockup.tsx +++ b/app/javascript/mastodon/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, ], );