-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'refs/heads/dev' into main
- Loading branch information
Showing
4 changed files
with
78 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
"use client"; | ||
|
||
import { FC } from "react"; | ||
import { | ||
Table, | ||
TableBody, | ||
TableColumn, | ||
TableHeader, | ||
TableRow, | ||
Tooltip, | ||
} from "@nextui-org/react"; | ||
import { TableManageUsersColumns } from "@/_lib/constants"; | ||
import { Trash2 } from "lucide-react"; | ||
|
||
const ManageUsersTable: FC = () => { | ||
const users = []; | ||
|
||
return ( | ||
<> | ||
<Table aria-label={"Table for Managing Users"} className={"mt-5"}> | ||
<TableHeader> | ||
{TableManageUsersColumns.map((column) => ( | ||
<TableColumn key={column}>{column}</TableColumn> | ||
))} | ||
</TableHeader> | ||
<TableBody> | ||
{users.map((user) => ( | ||
<TableRow key={user.id}> | ||
<TableColumn>{user.firstName}</TableColumn> | ||
<TableColumn>{user.lastName}</TableColumn> | ||
<TableColumn>{user.email}</TableColumn> | ||
<TableColumn>{user.id}</TableColumn> | ||
<TableColumn> | ||
<Tooltip content={"Delete"}> | ||
<span className="text-lg text-danger-600 cursor-pointer active:opacity-50"> | ||
<Trash2 | ||
size={16} | ||
onClick={() => { | ||
console.log("Delete user"); | ||
}} | ||
/> | ||
</span> | ||
</Tooltip> | ||
</TableColumn> | ||
</TableRow> | ||
))} | ||
</TableBody> | ||
</Table> | ||
</> | ||
); | ||
}; | ||
|
||
export default ManageUsersTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React, { FC } from "react"; | ||
import ManageUsersTable from "@/app/admin/users/_components/ManageUsersTable"; | ||
|
||
const Users: FC = () => { | ||
return ( | ||
<div className={"wrapper"}> | ||
<h1 className={"text-xl my-5"}>Users Page</h1> | ||
<ManageUsersTable /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Users; |