Merge pull request #521 from LAION-AI/237-manage-user-page

Adding an admin page to manage a specific user's status
This commit is contained in:
AbdBarho
2023-01-08 10:04:37 +01:00
committed by GitHub
9 changed files with 605 additions and 26 deletions
+5
View File
@@ -1,4 +1,5 @@
import { Table, TableCaption, TableContainer, Tbody, Td, Th, Thead, Tr } from "@chakra-ui/react";
import Link from "next/link";
import { useState } from "react";
import fetcher from "src/lib/fetcher";
import useSWR from "swr";
@@ -24,6 +25,7 @@ const UsersCell = () => {
<Th>Email</Th>
<Th>Name</Th>
<Th>Role</Th>
<Th>Update</Th>
</Tr>
</Thead>
<Tbody>
@@ -33,6 +35,9 @@ const UsersCell = () => {
<Td>{user.email}</Td>
<Td>{user.name}</Td>
<Td>{user.role}</Td>
<Td>
<Link href={`/admin/manage_user/${user.id}`}>Manage</Link>
</Td>
</Tr>
))}
</Tbody>