Skip to content

Commit

Permalink
fix phone number field
Browse files Browse the repository at this point in the history
  • Loading branch information
skks1212 committed May 17, 2024
1 parent 22b0469 commit f029cab
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/Components/Facility/DischargedPatientsList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Link, navigate, useQueryParams } from "raviger";
import { Link, navigate } from "raviger";
import routes from "../../Redux/api";
import Page from "../Common/components/Page";
import PaginatedList from "../../CAREUI/misc/PaginatedList";
Expand Down Expand Up @@ -56,14 +56,15 @@ const DischargedPatientsList = ({
],
});

const [urlParams] = useQueryParams();

useEffect(() => {
if (!urlParams.phone_number) {
//setPhoneNumber("+91");
if (!qParams.phone_number && phone_number.length >= 13) {
setPhoneNumber("+91");
}
if (!urlParams.emergency_phone_number) {
//setEmergencyPhoneNumber("+91");
if (
!qParams.emergency_phone_number &&
emergency_phone_number.length >= 13
) {
setEmergencyPhoneNumber("+91");
}
}, [qParams]);

Expand Down

0 comments on commit f029cab

Please sign in to comment.