Unverified Commit c2cdb848 authored by Joram Wilander's avatar Joram Wilander Committed by cpanato

Remove fixed class from body when announcement bar is unmounted (#2198)

parent 871ec294
...@@ -28,6 +28,10 @@ export default class AnnouncementBar extends React.PureComponent { ...@@ -28,6 +28,10 @@ export default class AnnouncementBar extends React.PureComponent {
this.setBodyClass(!this.props.showCloseButton); this.setBodyClass(!this.props.showCloseButton);
} }
componentWillUnmount() {
document.body.classList.remove('announcement-bar--fixed');
}
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if (this.props.showCloseButton !== prevProps.showCloseButton) { if (this.props.showCloseButton !== prevProps.showCloseButton) {
this.setBodyClass(!this.props.showCloseButton); this.setBodyClass(!this.props.showCloseButton);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment