Skip to content

Commit

Permalink
fix: clear space when navigating away
Browse files Browse the repository at this point in the history
closes #41
  • Loading branch information
juancarlosfarah committed May 1, 2019
1 parent 45f7050 commit 4433367
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/space/SpaceScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class SpaceScreen extends Component {
match: PropTypes.shape({ params: { id: PropTypes.string.isRequired } })
.isRequired,
dispatchGetSpace: PropTypes.func.isRequired,
dispatchClearSpace: PropTypes.func.isRequired,
history: PropTypes.shape({ length: PropTypes.number.isRequired })
.isRequired,
};
Expand All @@ -91,6 +92,11 @@ class SpaceScreen extends Component {
}
}

componentWillUnmount() {
const { dispatchClearSpace } = this.props;
dispatchClearSpace();
}

handleDrawerOpen = () => {
this.setState({ openDrawer: true });
};
Expand Down

0 comments on commit 4433367

Please sign in to comment.