diff --git a/packages/pl-fe/src/api/hooks/accounts/use-relationships.ts b/packages/pl-fe/src/api/hooks/accounts/use-relationships.ts deleted file mode 100644 index 89d59a47f..000000000 --- a/packages/pl-fe/src/api/hooks/accounts/use-relationships.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Entities } from 'pl-fe/entity-store/entities'; -import { useBatchedEntities } from 'pl-fe/entity-store/hooks/use-batched-entities'; -import { useClient } from 'pl-fe/hooks/use-client'; -import { useLoggedIn } from 'pl-fe/hooks/use-logged-in'; - -import type { Relationship } from 'pl-api'; - -const useRelationships = (listKey: string[], accountIds: string[]) => { - const client = useClient(); - const { isLoggedIn } = useLoggedIn(); - - const fetchRelationships = (accountIds: string[]) => client.accounts.getRelationships(accountIds); - - const { entityMap: relationships, ...result } = useBatchedEntities( - [Entities.RELATIONSHIPS, ...listKey], - accountIds, - fetchRelationships, - { enabled: isLoggedIn }, - ); - - return { relationships, ...result }; -}; - -export { useRelationships };