pl-fe: Display outgoing follow requests

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk
2025-03-13 12:46:57 +01:00
parent f0cd921109
commit ee5cacd176
7 changed files with 106 additions and 19 deletions

View File

@ -35,6 +35,11 @@ const useFollowRequests = makeUseFollowRequests((data) => data.pages.map(page =>
const useFollowRequestsCount = makeUseFollowRequests((data) => data.pages.map(page => page.items).flat().length);
const useOutgoingFollowRequests = makePaginatedResponseQuery(
() => ['accountsLists', 'outgoingFollowRequests'],
(client) => client.myAccount.getOutgoingFollowRequests().then(minifyAccountList),
);
const useAcceptFollowRequestMutation = (accountId: string) => {
const client = useClient();
const dispatch = useAppDispatch();
@ -73,6 +78,7 @@ export {
appendFollowRequest,
useFollowRequests,
useFollowRequestsCount,
useOutgoingFollowRequests,
useAcceptFollowRequestMutation,
useRejectFollowRequestMutation,
prefetchFollowRequests,