From 915fb4882866859ec0c8a1696253b0d65b427499 Mon Sep 17 00:00:00 2001 From: wisecolt Date: Sat, 3 Jan 2026 23:59:42 +0300 Subject: [PATCH] =?UTF-8?q?feat(ui):=20torrentleri=20tarihe=20g=C3=B6re=20?= =?UTF-8?q?s=C4=B1rala?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/components/torrents/TorrentTable.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) => {