updated admin logs // table sorted in reversed

This commit is contained in:
Cypro Freelance 2024-07-17 22:46:21 +05:30
parent ffe93a3257
commit 31e840c88e

View file

@ -208,22 +208,27 @@ const AdminLogPage = () => {
</TableRow> </TableRow>
</TableHeader> </TableHeader>
<TableBody> <TableBody>
{logs.map((log) => ( {logs
<TableRow key={log._id}> .slice()
<TableCell className="border-b px-4 py-2"> .reverse()
{log.version} .map((log) => (
</TableCell> <TableRow key={log._id}>
<TableCell className="border-b px-4 py-2">{log.date}</TableCell> <TableCell className="border-b px-4 py-2">
<TableCell className="border-b px-4 py-2"> {log.version}
<Button </TableCell>
variant={"destructive"} <TableCell className="border-b px-4 py-2">
onClick={() => deleteLog(log._id)} {log.date}
> </TableCell>
Delete <TableCell className="border-b px-4 py-2">
</Button> <Button
</TableCell> variant={"destructive"}
</TableRow> onClick={() => deleteLog(log._id)}
))} >
Delete
</Button>
</TableCell>
</TableRow>
))}
</TableBody> </TableBody>
</Table> </Table>
</section> </section>