diff --git a/apps/web/src/components/torrents/TorrentTable.tsx b/apps/web/src/components/torrents/TorrentTable.tsx index 3568e2e..43fad84 100644 --- a/apps/web/src/components/torrents/TorrentTable.tsx +++ b/apps/web/src/components/torrents/TorrentTable.tsx @@ -32,9 +32,11 @@ export const TorrentTable = () => { const [query, setQuery] = useState(""); const filtered = useMemo(() => { - return torrents.filter((torrent) => - torrent.name.toLowerCase().includes(query.toLowerCase()) - ); + return torrents + .filter((torrent) => + torrent.name.toLowerCase().includes(query.toLowerCase()) + ) + .sort((a, b) => (b.added_on ?? 0) - (a.added_on ?? 0)); }, [torrents, query]); const deleteTorrent = async (hash: string) => {