Skip to content

Commit

Permalink
ENH Do not use deprecated lifecycle methods
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Mar 28, 2023
1 parent 102a3b5 commit 20588d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,17 @@ import url from 'url';
import qs from 'qs';

class HistoryViewerVersionDetail extends PureComponent {
componentWillMount() {
componentDidMount() {
this.toggleToolbarClass(true);
}

/**
* When new props are received (from Redux dispatch events), check whether the preview
* state changes. If so, we want to add or remove the legacy CSS modifier for the CMS
* north toolbar based on whether the view mode is "split" (add) or anything else (remove)
*
* @param {Object} nextProps
*/
componentWillReceiveProps(nextProps) {
if (nextProps.previewState !== this.props.previewState) {
this.toggleToolbarClass(nextProps.previewState === 'split');
}
componentDidUpdate() {
this.toggleToolbarClass(this.props.previewState === 'split');
}

componentWillUnmount() {
Expand Down

0 comments on commit 20588d7

Please sign in to comment.