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 [query, setQuery] = useState("");
|
||||||
|
|
||||||
const filtered = useMemo(() => {
|
const filtered = useMemo(() => {
|
||||||
return torrents.filter((torrent) =>
|
return torrents
|
||||||
torrent.name.toLowerCase().includes(query.toLowerCase())
|
.filter((torrent) =>
|
||||||
);
|
torrent.name.toLowerCase().includes(query.toLowerCase())
|
||||||
|
)
|
||||||
|
.sort((a, b) => (b.added_on ?? 0) - (a.added_on ?? 0));
|
||||||
}, [torrents, query]);
|
}, [torrents, query]);
|
||||||
|
|
||||||
const deleteTorrent = async (hash: string) => {
|
const deleteTorrent = async (hash: string) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user