diff --git a/src/App.tsx b/src/App.tsx
index 0da2361..6e8521e 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -12,6 +12,7 @@ import BulkUsers from "./pages/admin/BulkCreateUser";
import Users from "./pages/admin/Users";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";
+import AdminPage from "./pages/admin/AdminPage";
function App() {
return (
@@ -25,6 +26,7 @@ function App() {
} />
} />
} />
+ } />
} />
} />
} />
diff --git a/src/pages/admin/AdminPage.tsx b/src/pages/admin/AdminPage.tsx
new file mode 100644
index 0000000..3606dd0
--- /dev/null
+++ b/src/pages/admin/AdminPage.tsx
@@ -0,0 +1,9 @@
+function AdminPage() {
+ return (
+
+
Admin Page
+
+ );
+}
+
+export default AdminPage;
diff --git a/src/pages/admin/Users.tsx b/src/pages/admin/Users.tsx
index 06fe1ee..d9d4c6b 100644
--- a/src/pages/admin/Users.tsx
+++ b/src/pages/admin/Users.tsx
@@ -3,23 +3,36 @@ import { useEffect, useState } from "react";
function Users() {
const [users, setUsers] = useState([]);
+ const [reload, setReload] = useState(0);
useEffect(() => {
axios.get("/api/users").then((res) => {
setUsers(res.data);
- console.log(res.data)
});
- }, []);
+ }, [reload]);
const handleEditUser = (userId) => {
- // Logic for editing the user (e.g., opening a modal)
alert(`Edit user with ID: ${userId}`);
};
+ const deleteJDMIUsers = () => {
+ axios.delete("/api/users").then((res) => {
+ console.log(res.data);
+ setReload(reload + 1);
+ });
+ };
+
return (
-
Manage Users
+
+
+ Manage Users
+
+
+
{/* Users Table */}