Skip to content

Commit

Permalink
Merge pull request #4539 from coronasafe/fix#4538
Browse files Browse the repository at this point in the history
Fixed patient loading issue while directly using the link
  • Loading branch information
mathew-alex authored Jan 7, 2023
2 parents 887f25f + 4f1ad24 commit 88c0672
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Components/Patient/ManagePatients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import ButtonV2 from "../Common/components/ButtonV2";
import { ExportMenu } from "../Common/Export";
import PhoneNumberFormField from "../Form/FormFields/PhoneNumberFormField";
import { FieldChangeEvent } from "../Form/FormFields/Utils";
import useIsInitialRender from "../../Common/hooks/useIsInitialRender";

const Loading = loadable(() => import("../Common/Loading"));
const PageTitle = loadable(() => import("../Common/PageTitle"));
Expand Down Expand Up @@ -99,7 +98,6 @@ export const PatientManager = () => {
const [emergency_phone_number, setEmergencyPhoneNumber] = useState("");
const [emergencyPhoneNumberError, setEmergencyPhoneNumberError] =
useState("");
const isInitialRender = useIsInitialRender();

useEffect(() => {
if (phone_number.length === 15) {
Expand Down Expand Up @@ -241,7 +239,7 @@ export const PatientManager = () => {
};

useEffect(() => {
if (isInitialRender) return;
if (params.page === 1) return;

setIsLoading(true);
dispatch(getAllPatient(params, "listPatients"))
Expand Down

0 comments on commit 88c0672

Please sign in to comment.