pleroma/app/soapbox/hooks/api/groups/useGroupMembershipRequests.ts
2023-03-20 15:54:06 -05:00

13 lines
No EOL
430 B
TypeScript

import { Entities } from 'soapbox/entity-store/entities';
import { useEntities } from 'soapbox/entity-store/hooks';
import { accountSchema } from 'soapbox/schemas';
function useGroupMembershipRequests(groupId: string) {
return useEntities(
[Entities.ACCOUNTS, 'membership_requests', groupId],
`/api/v1/groups/${groupId}/membership_requests`,
{ schema: accountSchema },
);
}
export { useGroupMembershipRequests };