Skip to content

Commit

Permalink
fix #56
Browse files Browse the repository at this point in the history
  • Loading branch information
LucienLee committed Nov 22, 2017
1 parent dc95d48 commit 71695cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pages/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
submitReply,
connectReply,
updateReplyConnectionStatus,
reset,
} from '../redux/articleDetail';

import { detailStyle, tabMenuStyle } from './article.styles';
Expand Down Expand Up @@ -119,6 +120,11 @@ class ArticlePage extends React.Component {
};
};

componentWillUnmount() {
const { dispatch } = this.props;
dispatch(reset());
}

renderTabMenu = () => {
const { data } = this.props;
const { tab } = this.state;
Expand Down
2 changes: 1 addition & 1 deletion redux/articleDetail.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const loadAuth = id => dispatch => {
});
};

export const reset = () => createAction(RESET);
export const reset = createAction(RESET);

const reloadReply = articleId => dispatch =>
gql`
Expand Down

0 comments on commit 71695cc

Please sign in to comment.