mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
test fix
This commit is contained in:
parent
ccdef8143e
commit
826cb07953
@ -21,12 +21,16 @@ export default class Pagination extends PureComponent<
|
||||
private mq = window.matchMedia && window.matchMedia('(min-width: 600px)')
|
||||
|
||||
public componentDidMount() {
|
||||
this.mq.addListener(this.viewportChange)
|
||||
this.viewportChange(this.mq)
|
||||
if (window && window.matchMedia) {
|
||||
this.mq.addListener(this.viewportChange)
|
||||
this.viewportChange(this.mq)
|
||||
}
|
||||
}
|
||||
|
||||
public componentWillUnmount() {
|
||||
this.mq.removeListener(this.viewportChange)
|
||||
if (window && window.matchMedia) {
|
||||
this.mq.removeListener(this.viewportChange)
|
||||
}
|
||||
}
|
||||
|
||||
private viewportChange = (mq: { matches: boolean }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user