Skip to content

Commit

Permalink
display a toast message when an empty updates is submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexben001 committed Sep 23, 2019
1 parent 4ced9ec commit 5cd3107
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/pages/UpdateFarmer/UpdateFarmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ const UpdateFarmer = ({ location, history, appStateShouldUpdate, user }) => {
'Looks like there is a problem with your connection. Please try again later'
);
}
if(err.response.status){
toast.warn(err.response.data.message)
}
err.response.data.errors.forEach(element => {
toast.error(element.message);
});
Expand Down

0 comments on commit 5cd3107

Please sign in to comment.