mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 19:02:15 +00:00
Popup declared PureComponent
This commit is contained in:
parent
235c3b2d3a
commit
acb7e67a6a
1 changed files with 2 additions and 6 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import React, { Component, Fragment } from 'react';
|
||||
import React, { PureComponent, Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { Modal } from 'stremio-common';
|
||||
import styles from './styles';
|
||||
|
||||
class Popup extends Component {
|
||||
class Popup extends PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
|
|
@ -14,10 +14,6 @@ class Popup extends Component {
|
|||
};
|
||||
}
|
||||
|
||||
shouldComponentUpdate(nextProps, nextState) {
|
||||
return nextState.isOpen !== this.state.isOpen;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
window.addEventListener('blur', this.close);
|
||||
window.addEventListener('resize', this.close);
|
||||
|
|
|
|||
Loading…
Reference in a new issue