Skip to content

Commit

Permalink
switch to Button
Browse files Browse the repository at this point in the history
  • Loading branch information
rajku-dev committed Dec 7, 2024
1 parent 72b3bff commit a796de0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
2 changes: 1 addition & 1 deletion public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,7 @@
"view_cns": "View CNS",
"view_consultation_and_log_updates": "View Consultation / Log Updates",
"view_details": "View Details",
"view_faciliy": "View Facility",
"view_facility": "View Facility",
"view_files": "View Files",
"view_patients": "View Patients",
"view_update_patient_files": "View/Update patient files",
Expand Down
38 changes: 21 additions & 17 deletions src/components/Facility/FacilityCard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import careConfig from "@careConfig";
import { Link } from "raviger";
import { Link,navigate } from "raviger";
import { useState } from "react";
import { useTranslation } from "react-i18next";
import { Button } from "@/components/ui/button";

import Chip from "@/CAREUI/display/Chip";
import CareIcon from "@/CAREUI/icons/CareIcon";
Expand Down Expand Up @@ -222,44 +223,47 @@ export const FacilityCard = (props: {
</div>
<div className="flex flex-wrap gap-2">
{["DistrictAdmin", "StateAdmin"].includes(userType) && (
<ButtonV2
<Button
id="facility-notify"
ghost
border
variant={"outline"}
className="h-[38px] tooltip"
onClick={(_) => setNotifyModalFor(facility.id)}
aria-label={t("notify")}
role="button"
>
<CareIcon icon="l-megaphone" className="text-lg" />
<span className="hidden md:block">{t("notify")}</span>
<span className="tooltip-text tooltip-top md:hidden">
{t("notify")}
</span>
</ButtonV2>
</Button>
)}
<ButtonV2
href={`/facility/${facility.id}`}
<Button
onClick={() => navigate(`/facility/${facility.id}`)}
id="facility-details"
border
ghost
variant={"outline"}
className="tooltip h-[38px]"
aria-label={t("view_facility")}
role="button"
>
<CareIcon icon="l-hospital" className="text-lg" />
<span className="hidden sm:inline">
{t("view_faciliy")}
{t("view_facility")}
</span>
<span className="tooltip-text tooltip-top sm:hidden">
{t("view_faciliy")}
{t("view_facility")}
</span>
</ButtonV2>
<ButtonV2
href={`/patients?facility=${facility.id}`}
</Button>
<Button
onClick={() => navigate(`/patients?facility=${facility.id}`)}
id="facility-patients"
border
ghost
variant={"outline"}
aria-label={t("view_patients")}
role="button"
>
<CareIcon icon="l-user-injured" className="text-lg" />
{t("view_patients")}
</ButtonV2>
</Button>
{/* </div> */}
</div>
</div>
Expand Down

0 comments on commit a796de0

Please sign in to comment.