fix: make download page show 10 latest versions instead of 10 first versions

This commit is contained in:
Dorian Niemiec 2024-09-08 08:56:02 +02:00
parent 637ca26aa7
commit c614379252

View file

@ -71,7 +71,7 @@ const DownloadPage: React.FC = async () => {
</TableHeader> </TableHeader>
<TableBody> <TableBody>
{downloads {downloads
.slice(0, 10) .slice(downloads.length - 10 < 0 ? 0 : downloads.length - 10)
.reverse() .reverse()
.map((download) => ( .map((download) => (
<TableRow key={download._id}> <TableRow key={download._id}>