diff --git a/web/src/pages/ApiServices/index.tsx b/web/src/pages/ApiServices/index.tsx index 45b9383..32f66b1 100644 --- a/web/src/pages/ApiServices/index.tsx +++ b/web/src/pages/ApiServices/index.tsx @@ -1,44 +1,10 @@ +import Breadcrumbs from "@/components/ui/breadcrumbs"; import { Button } from "@/components/ui/button"; import { useAdmin } from "@/store/admin"; import { Plus } from "lucide-react"; import { useEffect, type FC } from "react"; import { Link } from "react-router"; -// const services = [ -// { -// id: "1", -// name: "User Service", -// clientId: "user-svc-001", -// isActive: true, -// createdAt: "2024-09-15T10:20:30Z", -// updatedAt: "2025-01-10T12:00:00Z", -// }, -// { -// id: "2", -// name: "Billing Service", -// clientId: "billing-svc-009", -// isActive: false, -// createdAt: "2024-10-01T08:45:10Z", -// updatedAt: "2025-03-22T14:30:00Z", -// }, -// { -// id: "3", -// name: "Analytics Service", -// clientId: "analytics-svc-777", -// isActive: true, -// createdAt: "2024-11-25T16:00:00Z", -// updatedAt: "2025-02-05T10:15:45Z", -// }, -// { -// id: "4", -// name: "Email Service", -// clientId: "email-svc-333", -// isActive: false, -// createdAt: "2023-07-10T13:00:00Z", -// updatedAt: "2024-12-31T09:25:00Z", -// }, -// ]; - const ApiServicesPage: FC = () => { const apiServices = useAdmin((state) => state.apiServices); const loading = useAdmin((state) => state.loadingApiServices); @@ -49,91 +15,107 @@ const ApiServicesPage: FC = () => { }, [fetchApiServices]); return ( -
+
+

Search...

- + + +
- - {loading && ( -
-
- Loading... +
+
+ {loading && ( +
+
+ Loading... +
- - )} + )} - - - - - - - - - - - {!loading && apiServices.length === 0 ? ( + - + + + + + - ) : ( - apiServices.map((service) => ( - - - - - - + + {!loading && apiServices.length === 0 ? ( + + - )) - )} - -
- Name - - Client ID - - Is Active - - Created At - - Updated At -
- No services found. - + Name + + Client ID + + Is Active + + Created At + + Updated At +
- - {service.name} - - - {service.client_id} - - - {service.is_active ? "Yes" : "No"} - - - {new Date(service.created_at).toLocaleString()} - - {new Date(service.updated_at).toLocaleString()} +
+ No services found.
+ ) : ( + apiServices.map((service) => ( + + + + {service.name} + + + + {service.client_id} + + + + {service.is_active ? "Yes" : "No"} + + + + {new Date(service.created_at).toLocaleString()} + + + {new Date(service.updated_at).toLocaleString()} + + + )) + )} + + +
); };