-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAdminViewProviders.jsx
More file actions
38 lines (32 loc) · 939 Bytes
/
AdminViewProviders.jsx
File metadata and controls
38 lines (32 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import "./styles.css";
import { useEffect, useState } from "react";
import Table from "../../../Components/AdminComponents/Table/Table";
import { fetchAllProviders } from "../Services/AdminViewProvidersService/AdminViewProvidersService";
const AdminViewProviders = () => {
const [providers, setProviders] = useState([]);
useEffect(() => {
const loadProviders = async () => {
const data = await fetchAllProviders();
setProviders(data);
};
loadProviders();
}, []);
const headers = [
"Provider ID",
"Full Name",
"Email",
"Phone Number",
"Actions",
];
return (
<div className="admin-view-providers-container">
<div className="admin-main-content">
<h1 className="admin-main-content-title section-titles">
View Providers
</h1>
<Table headers={headers} data={providers} />
</div>
</div>
);
};
export default AdminViewProviders;