Skip to content

Commit fda5776

Browse files
Fixed domain blocking UI update and labeling in ActivityPub (#24556)
ref PROD-2348 - Corrected query key for domain block/unblock mutations to properly update UI - Fixed UI not reflecting blocking changes despite successful backend operations - Changed profile menu item from "Unblock user" to "Unblock domain" when only domain is blocked
1 parent 963ed93 commit fda5776

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/admin-x-activitypub/src/hooks/use-activity-pub-queries.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ export function useBlockDomainMutationForUser(handle: string) {
622622
return;
623623
}
624624
queryClient.setQueryData(
625-
QUERY_KEYS.account(handle),
625+
QUERY_KEYS.account(data.handle),
626626
(currentAccount?: Account) => {
627627
if (!currentAccount) {
628628
return currentAccount;
@@ -659,7 +659,7 @@ export function useUnblockDomainMutationForUser(handle: string) {
659659
return;
660660
}
661661
queryClient.setQueryData(
662-
QUERY_KEYS.account(handle),
662+
QUERY_KEYS.account(data.handle),
663663
(currentAccount?: Account) => {
664664
if (!currentAccount) {
665665
return currentAccount;

apps/admin-x-activitypub/src/views/Profile/components/ProfileMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const ProfileMenu: React.FC<ProfileMenuProps> = ({
128128
}
129129
setDialogOpen(true);
130130
}}>
131-
{isBlocked || isDomainBlocked ? 'Unblock' : 'Block'} user
131+
{isBlocked ? 'Unblock user' : isDomainBlocked ? 'Unblock domain' : 'Block user'}
132132
</Button>
133133
</PopoverClose>
134134
</div>

0 commit comments

Comments
 (0)