pl-fe: remove unused code

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-10-23 14:21:54 +02:00
parent 93809e4543
commit ae97ccf7fc

View File

@ -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<Relationship>(
[Entities.RELATIONSHIPS, ...listKey],
accountIds,
fetchRelationships,
{ enabled: isLoggedIn },
);
return { relationships, ...result };
};
export { useRelationships };