torrent cards rewritten

This commit is contained in:
Daniel Shleifman
2021-06-02 19:19:41 +03:00
parent 8696f6cd0b
commit f0a2ba8390
13 changed files with 346 additions and 361 deletions

View File

@@ -8,3 +8,6 @@ export function getPeerString(torrent) {
if (!torrent || !torrent.connected_seeders) return ''
return `[${torrent.connected_seeders}] ${torrent.active_peers} / ${torrent.total_peers}`
}
export const shortenText = (text, sympolAmount) =>
text.slice(0, sympolAmount) + (text.length > sympolAmount ? '...' : '')