chore: formatting
This commit is contained in:
parent
faef2b5969
commit
60646daa8c
@ -31,7 +31,10 @@ export function TorrentList({ items }: { items: Array<TaggedNostrEvent> }) {
|
|||||||
function TorrentTableEntry({ item }: { item: TaggedNostrEvent }) {
|
function TorrentTableEntry({ item }: { item: TaggedNostrEvent }) {
|
||||||
const profile = useUserProfile(item.pubkey);
|
const profile = useUserProfile(item.pubkey);
|
||||||
const name = item.tags.find((a) => a[0] === "title")?.at(1);
|
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);
|
const npub = hexToBech32("npub", item.pubkey);
|
||||||
return (
|
return (
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -29,7 +29,10 @@ export function TorrentDetail({ item }: { item: TaggedNostrEvent }) {
|
|||||||
const login = useLogin();
|
const login = useLogin();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const name = item.tags.find((a) => a[0] === "title")?.at(1);
|
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 files = item.tags.filter((a) => a[0] === "file");
|
||||||
const tags = item.tags.filter((a) => a[0] === "t").map((a) => a[1]);
|
const tags = item.tags.filter((a) => a[0] === "t").map((a) => a[1]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user