Implemented strict mode for the project (broken tests, hundreds of @ts-ignore and new errors are included) [skip ci]

This commit is contained in:
ErickSkrauch
2020-01-17 23:37:52 +03:00
committed by SleepWalker
parent 10e8b77acf
commit 96049ad4ad
151 changed files with 2470 additions and 1869 deletions

View File

@@ -3,16 +3,18 @@ import React from 'react';
import { withRouter } from 'react-router-dom';
import { restoreScroll } from './scroll';
class ScrollIntoView extends React.PureComponent<
RouteComponentProps & {
top?: boolean; // do not touch any DOM and simply scroll to top on location change
}
> {
interface OwnProps {
top?: boolean; // don't touch any DOM and simply scroll to top on location change
}
type Props = RouteComponentProps & OwnProps;
class ScrollIntoView extends React.PureComponent<Props> {
componentDidMount() {
this.onPageUpdate();
}
componentDidUpdate(prevProps) {
componentDidUpdate(prevProps: Props) {
if (this.props.location !== prevProps.location) {
this.onPageUpdate();
}