diff --git a/src/components/Patient/SampleDetails.tsx b/src/components/Patient/SampleDetails.tsx index f0e5f0039e5..20c549e5ff5 100644 --- a/src/components/Patient/SampleDetails.tsx +++ b/src/components/Patient/SampleDetails.tsx @@ -14,12 +14,12 @@ import { GENDER_TYPES, TEST_TYPE_CHOICES } from "@/common/constants"; import { DetailRoute } from "@/Routers/types"; import routes from "@/Utils/request/api"; -import useTanStackQueryInstead from "@/Utils/request/useQuery"; +import useQuery from "@/Utils/request/useQuery"; import { formatDateTime, formatPatientAge } from "@/Utils/utils"; export const SampleDetails = ({ id }: DetailRoute) => { const { t } = useTranslation(); - const { loading: isLoading, data: sampleDetails } = useTanStackQueryInstead( + const { loading: isLoading, data: sampleDetails } = useQuery( routes.getTestSample, { pathParams: { @@ -264,9 +264,9 @@ export const SampleDetails = ({ id }: DetailRoute) => { const renderFlow = (flow: FlowModel) => { return ( - -
-
+ +
+
{t("status")}:{" "} {" "} @@ -323,16 +323,16 @@ export const SampleDetails = ({ id }: DetailRoute) => {
{t("status")}:{" "}
- - {t(`SAMPLE_TEST_HISTORY__${sampleDetails?.status}`)} + + {sampleDetails?.status}
{t("result")}:{" "}
- - {t(`SAMPLE_TEST_RESULT__${sampleDetails?.result}`)} + + {sampleDetails?.result}
@@ -540,7 +540,7 @@ export const SampleDetails = ({ id }: DetailRoute) => {

{t("sample_test_history")}

{sampleDetails?.flow && sampleDetails.flow.map((flow: FlowModel) => ( -
+
{renderFlow(flow)}
))}