pl-fe: no point in using useEntities here

Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
Nicole Mikołajczyk
2025-05-05 11:51:19 +02:00
parent 0ae92e4e55
commit 7f47d95767
4 changed files with 11 additions and 34 deletions

View File

@@ -1,20 +0,0 @@
import { Entities } from 'pl-fe/entity-store/entities';
import { useDeleteEntity } from 'pl-fe/entity-store/hooks/use-delete-entity';
import { useClient } from 'pl-fe/hooks/use-client';
import type { Group } from 'pl-api';
const useDeleteGroupStatus = (group: Pick<Group, 'id'>, statusId: string) => {
const client = useClient();
const { deleteEntity, isSubmitting } = useDeleteEntity(
Entities.STATUSES,
() => client.experimental.groups.deleteGroupStatus(group.id, statusId),
);
return {
mutate: deleteEntity,
isSubmitting,
};
};
export { useDeleteGroupStatus };