Revisi Admin Investasi

# fix:
- Perbaharui tampilan
### No issue
This commit is contained in:
2023-12-05 17:09:07 +08:00
parent 089010d2e8
commit 265a869946
16 changed files with 551 additions and 227 deletions

View File

@@ -0,0 +1,61 @@
"use client";
import {
Paper,
Stack,
Center,
Title,
Table,
Group,
Avatar,
} from "@mantine/core";
export default function TableTotalInvestasi({
totalInvestasiByUser,
}: {
totalInvestasiByUser: any[];
}) {
return (
<>
<Paper
radius={"md"}
bg={"gray.4"}
p={"sm"}
// sx={{ borderStyle: "solid", borderColor: "teal" }}
>
<Stack spacing={"xl"}>
<Center>
<Title order={4}>Total Investasi Pengguna</Title>
</Center>
<Table bg={"gray.2"} sx={{borderRadius: "10px"}}>
<thead>
<tr>
<th>
<Center>Username</Center>
</th>
<th>
<Center>Total</Center>
</th>
</tr>
</thead>
<tbody>
{totalInvestasiByUser.map((e) => (
<tr key={e.id}>
<td>
<Group>
<Avatar variant="gradient" radius={"xl"} /> {e.username}
</Group>
</td>
<td>
<Center>{e._count.Investasi}</Center>
</td>
</tr>
))}
</tbody>
</Table>
</Stack>
</Paper>
</>
);
}