fix: torrents by author

This commit is contained in:
Kieran 2023-11-27 16:56:06 +00:00
parent 40d477a35b
commit 128225b473
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
2 changed files with 3 additions and 3 deletions

View File

@ -3,9 +3,9 @@ import { TorrentKind } from "../const";
import { useRequestBuilder } from "@snort/system-react";
import { TorrentList } from "./torrent-list";
export function LatestTorrents() {
export function LatestTorrents({ author }: { author?: string }) {
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);

View File

@ -13,7 +13,7 @@ export function ProfilePage() {
return (
<>
<ProfileSection pubkey={link.id} />
<LatestTorrents />
<LatestTorrents author={link.id} />
</>
);
}