[Glitch] Run eslint --fix

I don't like it changing files this way, but it's basically what
c49213f0ea and a few others did.
This commit is contained in:
Claire
2023-02-03 20:52:07 +01:00
parent ed7cb79723
commit 155424e52f
233 changed files with 1262 additions and 1248 deletions

View File

@@ -76,7 +76,7 @@ export default class ModalRoot extends React.PureComponent {
};
componentDidUpdate () {
if (!!this.props.type) {
if (this.props.type) {
document.body.classList.add('with-modals--active');
document.documentElement.style.marginRight = `${getScrollbarWidth()}px`;
} else {
@@ -87,17 +87,17 @@ export default class ModalRoot extends React.PureComponent {
setBackgroundColor = color => {
this.setState({ backgroundColor: color });
}
};
renderLoading = modalId => () => {
return ['MEDIA', 'VIDEO', 'BOOST', 'FAVOURITE', 'DOODLE', 'CONFIRM', 'ACTIONS'].indexOf(modalId) === -1 ? <ModalLoading /> : null;
}
};
renderError = (props) => {
const { onClose } = this.props;
return <BundleModalError {...props} onClose={onClose} />;
}
};
handleClose = (ignoreFocus = false) => {
const { onClose } = this.props;
@@ -110,14 +110,14 @@ export default class ModalRoot extends React.PureComponent {
// This would be much smoother with react-intl 3+ and `forwardRef`.
}
onClose(message, ignoreFocus);
}
};
setModalRef = (c) => {
this._modal = c;
}
};
// prevent closing of modal when clicking the overlay
noop = () => {}
noop = () => {};
render () {
const { type, props, ignoreFocus } = this.props;