feat(ui): torrentleri tarihe göre sırala
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user