From 20892e07d16233658214a760929498beb1b85435 Mon Sep 17 00:00:00 2001 From: Abhishek Patel Date: Mon, 28 Oct 2024 03:36:20 +0530 Subject: [PATCH] Conditionally disable Manage bed button in Location Management Page #8814 (#8827) --- src/components/Facility/LocationManagement.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/Facility/LocationManagement.tsx b/src/components/Facility/LocationManagement.tsx index 82184887332..6933a760969 100644 --- a/src/components/Facility/LocationManagement.tsx +++ b/src/components/Facility/LocationManagement.tsx @@ -14,9 +14,8 @@ import DialogModal from "@/components/Common/Dialog"; import Uptime from "@/components/Common/Uptime"; import useAuthUser from "@/common/hooks/useAuthUser"; import useQuery from "../../Utils/request/useQuery"; - import Loading from "@/components/Common/Loading"; -import { cn } from "@/lib/utils"; + interface Props { facilityId: string; } @@ -287,11 +286,9 @@ const Location = ({ id="manage-bed-button" variant="secondary" border - className={cn( - "mt-3 flex w-full items-center justify-between", - totalBeds != null && "opacity-50", - )} + className="mt-3 flex w-full items-center justify-between" href={`location/${id}/beds`} + disabled={totalBeds == null} > Manage Beds