import { NormalizedTorrent } from '@ctrl/shared-torrent'; import { Tooltip, Text, Progress, useMantineTheme } from '@mantine/core'; import { useElementSize } from '@mantine/hooks'; import { calculateETA } from '../../tools/calculateEta'; import { humanFileSize } from '../../tools/humanFileSize'; interface BitTorrentQueueItemProps { torrent: NormalizedTorrent; } export const BitTorrrentQueueItem = ({ torrent }: BitTorrentQueueItemProps) => { const MIN_WIDTH_MOBILE = useMantineTheme().breakpoints.xs; const { width } = useElementSize(); const downloadSpeed = torrent.downloadSpeed / 1024 / 1024; const uploadSpeed = torrent.uploadSpeed / 1024 / 1024; const size = torrent.totalSelected; return (