Skip to content

Commit

Permalink
Conditionally disable Manage bed button in Location Management Page #…
Browse files Browse the repository at this point in the history
  • Loading branch information
abhip161 authored Oct 27, 2024
1 parent 59056d0 commit 20892e0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/components/Facility/LocationManagement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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
<span className="flex items-center justify-center gap-2">
Expand Down

0 comments on commit 20892e0

Please sign in to comment.