import { Widget, WidgetBody, WidgetTitle } from '@/portainer/components/widget'; import { DetailsTable } from '@/portainer/components/DetailsTable'; import { Button } from '@/portainer/components/Button'; import { Authorized } from '@/portainer/hooks/useUser'; import { EnvironmentId } from '@/portainer/environments/types'; import { Link } from '@/portainer/components/Link'; import { NetworkContainer, NetworkId } from '../types'; import { useDisconnectContainer } from '../queries'; type Props = { networkContainers: NetworkContainer[]; nodeName: string; environmentId: EnvironmentId; networkId: NetworkId; }; const tableHeaders = [ 'Container Name', 'IPv4 Address', 'IPv6 Address', 'MacAddress', 'Actions', ]; export function NetworkContainersTable({ networkContainers, nodeName, environmentId, networkId, }: Props) { const disconnectContainer = useDisconnectContainer(); if (networkContainers.length === 0) { return null; } return (