Skip to content

Commit 2e30e48

Browse files
authored
Removed redundant fields on search response in activitypub app (TryGhost#25670)
ref https://linear.app/ghost/issue/BER-3071 ref TryGhost/ActivityPub#1471 Removed redundant fields on search response in activitypub app - These fields were removed from the backend
1 parent 5a4170a commit 2e30e48

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

apps/activitypub/src/api/activitypub.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface Account {
3232

3333
export type AccountSearchResult = Pick<
3434
Account,
35-
'id' | 'name' | 'handle' | 'avatarUrl' | 'followedByMe' | 'followerCount' | 'blockedByMe' | 'domainBlockedByMe'
35+
'id' | 'name' | 'handle' | 'avatarUrl' | 'followedByMe' | 'blockedByMe' | 'domainBlockedByMe'
3636
>;
3737

3838
export type ExploreAccount = Pick<

apps/activitypub/src/components/modals/Search.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ interface AccountSearchResult {
1515
name: string;
1616
handle: string;
1717
avatarUrl: string;
18-
followerCount: number;
1918
followedByMe: boolean;
2019
blockedByMe: boolean;
2120
domainBlockedByMe: boolean;
@@ -35,15 +34,13 @@ const AccountSearchResultItem: React.FC<AccountSearchResultItemProps & {
3534

3635
const onFollow = () => {
3736
update(account.id, {
38-
followedByMe: true,
39-
followerCount: account.followerCount + 1
37+
followedByMe: true
4038
});
4139
};
4240

4341
const onUnfollow = () => {
4442
update(account.id, {
45-
followedByMe: false,
46-
followerCount: account.followerCount - 1
43+
followedByMe: false
4744
});
4845
};
4946

0 commit comments

Comments
 (0)