diff --git a/src/page/torrent.tsx b/src/page/torrent.tsx index c93c257..0aee9c7 100644 --- a/src/page/torrent.tsx +++ b/src/page/torrent.tsx @@ -26,6 +26,8 @@ export function TorrentPage() { export function TorrentDetail({ item }: { item: TaggedNostrEvent }) { const name = item.tags.find((a) => a[0] === "title")?.at(1); const size = Number(item.tags.find((a) => a[0] === "size")?.at(1)); + const files = item.tags.filter(a => a[0] === "file"); + const tags = item.tags.filter(a => a[0] === "t").map(a => a[1]); return (
@@ -36,6 +38,10 @@ export function TorrentDetail({ item }: { item: TaggedNostrEvent }) {
Size: {FormatBytes(size)}
Uploaded: {new Date(item.created_at * 1000).toLocaleDateString()}
+
Tags:
+ {tags.map(a =>
#{a}
)} +
+
Get this torrent @@ -44,6 +50,13 @@ export function TorrentDetail({ item }: { item: TaggedNostrEvent }) {

Description

{item.content}
+

Files

+
+ {files.map(a =>
+ {a[1]} + {FormatBytes(Number(a[2]))} +
)} +
); }