Skip to content

Commit

Permalink
AllergyList: Add i18n; map key
Browse files Browse the repository at this point in the history
  • Loading branch information
gigincg committed Jan 8, 2025
1 parent adac786 commit a481428
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/components/Patient/allergy/list.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { useQuery } from "@tanstack/react-query";
import { t } from "i18next";

import { Badge } from "@/components/ui/badge";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
Expand Down Expand Up @@ -85,22 +86,22 @@ export function AllergyList({ patientId, encounterId }: AllergyListProps) {
return (
<Card className="p-0">
<CardHeader className="px-4 py-0 pt-4">
<CardTitle>Allergies</CardTitle>
<CardTitle>{t("allergies")}</CardTitle>
</CardHeader>
<CardContent className="p-2">
<Table>
<TableHeader>
<TableRow>
<TableHead>Allergen</TableHead>
<TableHead>Category</TableHead>
<TableHead>Status</TableHead>
<TableHead>Criticality</TableHead>
<TableHead>Created By</TableHead>
<TableHead>{t("allergen")}</TableHead>
<TableHead>{t("category")}</TableHead>
<TableHead>{t("status")}</TableHead>
<TableHead>{t("criticality")}</TableHead>
<TableHead>{t("created_by")}</TableHead>
</TableRow>
</TableHeader>
<TableBody>
{allergies.results.map((allergy: AllergyIntolerance) => (
<TableRow>
<TableRow key={allergy.id}>
<TableCell className="font-medium">
{allergy.code.display}
</TableCell>
Expand Down

0 comments on commit a481428

Please sign in to comment.