pl-fe: no point in using useEntities here
Signed-off-by: Nicole Mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@@ -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 };
|
||||
Reference in New Issue
Block a user