import { Box, HStack, Table, TableProps, Tbody, Td, Th, Thead, Tr, } from '@chakra-ui/react'; import classNames from 'classnames'; import { FC } from 'react'; import { useTranslation } from 'react-i18next'; import { EmptySection, Sort, handleSort, } from 'components/table'; import { useInbounds, HostType } from 'stores'; type NodesTableProps = { hosts: HostType[]; } & TableProps; export const HostsTable: FC = ({ hosts }) => { const { hostsFilters: filters, onHostsFilterChange, onEditingHost, } = useInbounds(); const { t } = useTranslation(); return ( {hosts?.map((host, i) => { return ( onEditingHost(true, host)} > ); })} {(hosts?.length === 0 || hosts === undefined) && ( )}
{t('remark')} {t('hostsTable.address')} {t('hostsTable.port')}
{host.remark}
{host.address} {host.port}
{/* TODO: * */}
); };