Skip to content

Commit da322ca

Browse files
fix (PrimaryParametersPlot): fixed broken api (ohcnetwork#2729)
1 parent 20f694a commit da322ca

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

src/Components/Facility/Consultations/PrimaryParametersPlot.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,15 @@ import { StackedLinePlot } from "./components/StackedLinePlot";
88
import Pagination from "../../Common/Pagination";
99
import { PAGINATION_LIMIT } from "../../../Common/constants";
1010

11-
export const PrimaryParametersPlot = (props: any) => {
11+
interface PrimaryParametersPlotProps {
12+
facilityId: string;
13+
patientId: string;
14+
consultationId: string;
15+
}
16+
17+
export const PrimaryParametersPlot = ({
18+
consultationId,
19+
}: PrimaryParametersPlotProps) => {
1220
const dispatch: any = useDispatch();
1321
const [results, setResults] = useState({});
1422
const [currentPage, setCurrentPage] = useState(1);
@@ -35,7 +43,7 @@ export const PrimaryParametersPlot = (props: any) => {
3543
"rhythm_detail",
3644
],
3745
},
38-
props.consultationId
46+
{ consultationId }
3947
)
4048
);
4149
if (!status.aborted) {
@@ -45,14 +53,14 @@ export const PrimaryParametersPlot = (props: any) => {
4553
}
4654
}
4755
},
48-
[props.consultationId, dispatch, currentPage]
56+
[consultationId, dispatch, currentPage]
4957
);
5058

5159
useAbortableEffect(
5260
(status: statusType) => {
5361
fetchDailyRounds(status);
5462
},
55-
[props.consultationId, currentPage]
63+
[consultationId, currentPage]
5664
);
5765

5866
const handlePagination = (page: number) => {

0 commit comments

Comments
 (0)