From 60646daa8c2b77586beede7978929a363aca77ce Mon Sep 17 00:00:00 2001 From: Kieran Date: Mon, 27 Nov 2023 20:03:47 +0000 Subject: [PATCH] chore: formatting --- .drone.yml | 2 +- src/element/torrent-list.tsx | 5 ++++- src/page/torrent.tsx | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 38f6a31..c409f04 100644 --- a/.drone.yml +++ b/.drone.yml @@ -41,4 +41,4 @@ steps: volumes: - name: cache claim: - name: docker-cache \ No newline at end of file + name: docker-cache diff --git a/src/element/torrent-list.tsx b/src/element/torrent-list.tsx index 5682e4a..b160c98 100644 --- a/src/element/torrent-list.tsx +++ b/src/element/torrent-list.tsx @@ -31,7 +31,10 @@ export function TorrentList({ items }: { items: Array }) { function TorrentTableEntry({ item }: { item: TaggedNostrEvent }) { const profile = useUserProfile(item.pubkey); const name = item.tags.find((a) => a[0] === "title")?.at(1); - const size = item.tags.filter(a => a[0] === "file").map(a => Number(a[2])).reduce((acc, v) => acc += v, 0); + const size = item.tags + .filter((a) => a[0] === "file") + .map((a) => Number(a[2])) + .reduce((acc, v) => (acc += v), 0); const npub = hexToBech32("npub", item.pubkey); return ( diff --git a/src/page/torrent.tsx b/src/page/torrent.tsx index 7a615a8..204ddd7 100644 --- a/src/page/torrent.tsx +++ b/src/page/torrent.tsx @@ -29,7 +29,10 @@ export function TorrentDetail({ item }: { item: TaggedNostrEvent }) { const login = useLogin(); const navigate = useNavigate(); const name = item.tags.find((a) => a[0] === "title")?.at(1); - const size = item.tags.filter(a => a[0] === "file").map(a => Number(a[2])).reduce((acc, v) => acc += v, 0); + const size = item.tags + .filter((a) => a[0] === "file") + .map((a) => Number(a[2])) + .reduce((acc, v) => (acc += v), 0); const files = item.tags.filter((a) => a[0] === "file"); const tags = item.tags.filter((a) => a[0] === "t").map((a) => a[1]);