1
0
Fork 0
forked from gitea/nas

Upgrade ESlint to v8 (#23305)

This commit is contained in:
Nick Schonning 2023-01-29 19:45:35 -05:00 committed by GitHub
parent b58bf74e35
commit c49213f0ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
120 changed files with 832 additions and 810 deletions

View file

@ -14,7 +14,7 @@ export default class ImageLoader extends PureComponent {
height: PropTypes.number,
onClick: PropTypes.func,
zoomButtonHidden: PropTypes.bool,
}
};
static defaultProps = {
alt: '',
@ -26,7 +26,7 @@ export default class ImageLoader extends PureComponent {
loading: true,
error: false,
width: null,
}
};
removers = [];
canvas = null;
@ -86,7 +86,7 @@ export default class ImageLoader extends PureComponent {
image.addEventListener('load', handleLoad);
image.src = previewSrc;
this.removers.push(removeEventListeners);
})
});
clearPreviewCanvas () {
const { width, height } = this.canvas;
@ -126,7 +126,7 @@ export default class ImageLoader extends PureComponent {
setCanvasRef = c => {
this.canvas = c;
if (c) this.setState({ width: c.offsetWidth });
}
};
render () {
const { alt, src, width, height, onClick } = this.props;