Skip to content

Commit

Permalink
fix: fixed unmount component when path change
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Dec 1, 2021
1 parent d3b0afb commit 5ce69e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/CustomerSatisfaction/CustomerSatisfaction.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ const CustomerSatisfaction = () => {
};

useEffect(() => {
setSatisfaction(null);
setValidToken(null);
return () => {
dispatch(resetSubmitCustomerSatisfaction());
};
}, []);
}, [path]);

useEffect(() => {
setFormData({
Expand Down Expand Up @@ -199,7 +201,6 @@ const CustomerSatisfaction = () => {
</div>
</Form>
)}

{submitResults?.loading && <Loader active inline="centered" />}
{submitResults?.loaded && (
<Message positive>
Expand Down

0 comments on commit 5ce69e2

Please sign in to comment.