[Glitch] feat: Add "Followers you know" widget to user profiles

Port b135a831ea to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion
2025-05-13 08:38:18 +02:00
committed by Claire
parent 5321a553d5
commit 59f986784f
11 changed files with 210 additions and 17 deletions

View File

@@ -59,3 +59,16 @@ export const getAccountHidden = createSelector(
return hidden && !(isSelf || followingOrRequested);
},
);
export const getAccountFamiliarFollowers = createSelector(
[
(state: RootState) => state.accounts,
(state: RootState, id: string) => state.accounts_familiar_followers[id],
],
(accounts, accounts_familiar_followers) => {
if (!accounts_familiar_followers) return null;
return accounts_familiar_followers
.map((id) => accounts.get(id))
.filter((f) => !!f);
},
);