Skip to content

Commit

Permalink
Fixed new patient reset bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sujal1256 committed Oct 17, 2024
1 parent e2a203d commit 6c671ef
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Frontend/src/components/Patients.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ const Patients = () => {
password: newPatient.password,
});
setShowForm(false);
setNewPatient({
name: "",
age: "",
gender: "",
mobile: "",
email: "",
password: "",
});
} catch (error) {
console.log(error);
}
Expand All @@ -73,7 +81,6 @@ const Patients = () => {
getPatients();
}, [showForm, patients]);


const filteredPatients = patients.filter((patient) =>
patient.name.toLowerCase().includes(searchTerm.toLowerCase())
);
Expand Down

0 comments on commit 6c671ef

Please sign in to comment.