Skip to content

Commit

Permalink
Properly conditionally show a single toast when completing Basic Info…
Browse files Browse the repository at this point in the history
…rmation
  • Loading branch information
samau3 committed Sep 3, 2024
1 parent f847af7 commit efcff08
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions client/src/pages/patients/PatientRegistration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,9 @@ export default function PatientRegistration() {
'Patient basic information has been successfully updated.',
);
}
}

if (res.status === StatusCodes.BAD_REQUEST) {
} else if (res.status === StatusCodes.BAD_REQUEST) {
throw new Error('Invalid patient ID URL.');
}

if (!res.status.ok) {
} else {
throw new Error('Failed to register patient.');
}
} catch (err) {
Expand Down

0 comments on commit efcff08

Please sign in to comment.