From ae97ccf7fcbba21459f2d8e5fb0055b85a3f70c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Thu, 23 Oct 2025 14:21:54 +0200 Subject: [PATCH] pl-fe: remove unused code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- .../api/hooks/accounts/use-relationships.ts | 24 ------------------- 1 file changed, 24 deletions(-) delete mode 100644 packages/pl-fe/src/api/hooks/accounts/use-relationships.ts 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 };