From 64c68c9a3332e0062c526574f1d0287ec3f0326d Mon Sep 17 00:00:00 2001 From: imhdang <46804409+imhdang@users.noreply.github.com> Date: Mon, 23 Mar 2020 04:22:50 -0500 Subject: [PATCH 1/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6cb98dc..1782a66 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Add https://europe-west1-socialape-d081e.cloudfunctions.net/api as the 'proxy' v ## 2: Install packages -run `npm instll` +run `npm install` ## 3: Run project From f956ce4a3ce582c45fd15bec638c26624315fa3d Mon Sep 17 00:00:00 2001 From: imhdang <46804409+imhdang@users.noreply.github.com> Date: Mon, 23 Mar 2020 04:28:11 -0500 Subject: [PATCH 2/2] Fix clear errors in component state Fix bug that when submit valid comment after a blank comment, the red helper text persists. --- src/components/scream/CommentForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/scream/CommentForm.js b/src/components/scream/CommentForm.js index 961805e..576550a 100644 --- a/src/components/scream/CommentForm.js +++ b/src/components/scream/CommentForm.js @@ -24,7 +24,7 @@ class CommentForm extends Component { this.setState({ errors: nextProps.UI.errors }); } if (!nextProps.UI.errors && !nextProps.UI.loading) { - this.setState({ body: '' }); + this.setState({ body: '', errors: {} }); } }