diff --git a/src/CAREUI/misc/PaginatedList.tsx b/src/CAREUI/misc/PaginatedList.tsx index 1487d69e4fa..363e657f253 100644 --- a/src/CAREUI/misc/PaginatedList.tsx +++ b/src/CAREUI/misc/PaginatedList.tsx @@ -7,7 +7,6 @@ import ButtonV2, { import CareIcon from "../icons/CareIcon"; import { classNames } from "../../Utils/utils"; import Pagination from "../../Components/Common/Pagination"; -import Timeline from "../display/Timeline"; const DEFAULT_PER_PAGE_LIMIT = 14; @@ -135,21 +134,19 @@ const Items = (props: ItemsProps) => { } return ( - -
    - {loading && props.shimmer - ? Array.from({ length: props.shimmerCount ?? 8 }).map((_, i) => ( -
  • - {props.shimmer} -
  • - )) - : items.map((item, index, items) => ( -
  • - {props.children(item, items)} -
  • - ))} -
-
+ ); }; diff --git a/src/Components/Facility/Consultations/DailyRoundsList.tsx b/src/Components/Facility/Consultations/DailyRoundsList.tsx index 828a41c8c24..b0a27219139 100644 --- a/src/Components/Facility/Consultations/DailyRoundsList.tsx +++ b/src/Components/Facility/Consultations/DailyRoundsList.tsx @@ -10,7 +10,7 @@ import PageTitle from "../../Common/PageTitle"; import DailyRoundsFilter from "./DailyRoundsFilter"; import { ConsultationModel } from "../models"; import { useSlugs } from "../../../Common/hooks/useSlug"; -import { TimelineNode } from "../../../CAREUI/display/Timeline"; +import Timeline, { TimelineNode } from "../../../CAREUI/display/Timeline"; interface Props { consultation: ConsultationModel; @@ -44,69 +44,74 @@ export default function DailyRoundsList({ consultation }: Props) { - className="flex grow flex-col gap-3"> - {(item, items) => { - if (item.rounds_type === "AUTOMATED") { + + className="flex grow flex-col gap-3"> + {(item, items) => { + if (item.rounds_type === "AUTOMATED") { + return ( + + + + ); + } + + const itemUrl = ["NORMAL", "TELEMEDICINE"].includes( + item.rounds_type as string + ) + ? `${consultationUrl}/daily-rounds/${item.id}` + : `${consultationUrl}/daily_rounds/${item.id}`; + return ( - navigate(itemUrl)} + onUpdateLog={() => navigate(`${itemUrl}/update`)} /> ); - } - - const itemUrl = ["NORMAL", "TELEMEDICINE"].includes( - item.rounds_type - ) - ? `${consultationUrl}/daily-rounds/${item.id}` - : `${consultationUrl}/daily_rounds/${item.id}`; - - return ( - - navigate(itemUrl)} - onUpdateLog={() => navigate(`${itemUrl}/update`)} - /> - - ); - }} - + }} + +