import { notifySuccess } from '@/portainer/services/notifications'; import { AddButton } from '@@/buttons'; import { DeleteButton } from '@@/buttons/DeleteButton'; import { EdgeGroup } from '../types'; import { useDeleteEdgeGroupsMutation } from './useDeleteEdgeGroupMutation'; export function TableActions({ selectedItems, }: { selectedItems: Array; }) { const removeMutation = useDeleteEdgeGroupsMutation(); return (
handleRemove(selectedItems)} /> Add Edge group
); async function handleRemove(selectedItems: Array) { const ids = selectedItems.map((item) => item.Id); removeMutation.mutate(ids, { onSuccess: () => { notifySuccess('Success', 'Edge Group(s) removed'); }, }); } }