import { Table, Thead, Tbody, Th, Td, Tr, HStack } from '@chakra-ui/react'; import classNames from 'classnames'; import { InboundCard } from 'components/inbounds-card'; import { handleSort } from 'components/table'; import { useEffect } from 'react'; import { useTranslation } from 'react-i18next'; import { useInbounds } from 'stores'; export const InboundsSidebar = () => { const { inbounds, onInboundsFilterChange, inboundsFilters: filters, selectedInbound, selectInbound, refetchInbounds } = useInbounds(); const { t } = useTranslation(); useEffect(() => { inbounds.length === 0 && refetchInbounds(); }, [inbounds.length]) return ( {inbounds.map((inbound, i) => { const active = inbounds[i] == selectedInbound return ( { selectInbound(inbound) }}> ); })}
{t('inbounds')}
) }