diff --git a/src/Components/DashboardPage/Technician/TechnicianWidgets.tsx b/src/Components/DashboardPage/Technician/TechnicianWidgets.tsx index 65726b0..b412176 100644 --- a/src/Components/DashboardPage/Technician/TechnicianWidgets.tsx +++ b/src/Components/DashboardPage/Technician/TechnicianWidgets.tsx @@ -6,7 +6,6 @@ import { UserAPI, TransactionsAPI, } from "../../API/API"; -import CircularProgress from "@mui/material/CircularProgress"; import moment from "moment"; export default function TechnicianWidgets() { @@ -34,24 +33,6 @@ export default function TechnicianWidgets() { }, ], }); - const isLoading = queries.some((result) => result.isLoading); - if (isLoading) { - return ( - <> - -

- Loading widgets... -

- - ); - } return (
{queries[1].data?.filter( (equipment) => equipment.status == "Pending" - ).length || 0} + ).length || "Loading..."}

- {queries[1].data?.length || 0} + {queries[1].data?.length || "Loading..."}

@@ -169,7 +150,7 @@ export default function TechnicianWidgets() { > {queries[1].data?.filter( (equipment) => equipment.status == "Available" - ).length || 0} + ).length || "Loading..."}

{queries[1].data?.filter( (equipment) => equipment.status == "Broken" - ).length || 0} + ).length || "Loading..."}

@@ -249,7 +230,7 @@ export default function TechnicianWidgets() { todayStartOfDay, todayEndOfDay ) - ).length || 0} + ).length || "Loading..."}