import { Group, Stack, Text } from '@mantine/core'; import { IconArrowNarrowDown, IconArrowNarrowUp } from '@tabler/icons-react'; import { useTranslation } from 'next-i18next'; import { RouterOutputs } from '~/utils/api'; import { bytes } from '../../tools/bytesHelper'; interface DashDotCompactNetworkProps { info: DashDotInfo; } export type DashDotInfo = RouterOutputs['dashDot']['info']; export const DashDotCompactNetwork = ({ info }: DashDotCompactNetworkProps) => { const { t } = useTranslation('modules/dashdot'); const upSpeed = bytes.toPerSecondString(info?.network?.speedUp); const downSpeed = bytes.toPerSecondString(info?.network?.speedDown); return ( {t('card.graphs.network.label')} {upSpeed} {downSpeed} ); };