feat(ui): torrentleri tarihe göre sırala

This commit is contained in:
2026-01-03 23:59:42 +03:00
parent 90732e06ef
commit 915fb48828

View File

@@ -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) => {