fix: torrents by author
This commit is contained in:
parent
40d477a35b
commit
128225b473
@ -3,9 +3,9 @@ import { TorrentKind } from "../const";
|
|||||||
import { useRequestBuilder } from "@snort/system-react";
|
import { useRequestBuilder } from "@snort/system-react";
|
||||||
import { TorrentList } from "./torrent-list";
|
import { TorrentList } from "./torrent-list";
|
||||||
|
|
||||||
export function LatestTorrents() {
|
export function LatestTorrents({ author }: { author?: string }) {
|
||||||
const sub = new RequestBuilder("torrents:latest");
|
const sub = new RequestBuilder("torrents:latest");
|
||||||
sub.withFilter().kinds([TorrentKind]).limit(100);
|
sub.withFilter().kinds([TorrentKind]).authors(author ? [author] : undefined).limit(100);
|
||||||
|
|
||||||
const latest = useRequestBuilder(NoteCollection, sub);
|
const latest = useRequestBuilder(NoteCollection, sub);
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ export function ProfilePage() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ProfileSection pubkey={link.id} />
|
<ProfileSection pubkey={link.id} />
|
||||||
<LatestTorrents />
|
<LatestTorrents author={link.id} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user