diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/dev-tools-pages/ts/components/Animations/index.tsx | 5 | ||||
-rw-r--r-- | packages/dev-tools-pages/ts/components/Code.tsx | 3 |
2 files changed, 0 insertions, 8 deletions
diff --git a/packages/dev-tools-pages/ts/components/Animations/index.tsx b/packages/dev-tools-pages/ts/components/Animations/index.tsx index da1b31917..da3e78193 100644 --- a/packages/dev-tools-pages/ts/components/Animations/index.tsx +++ b/packages/dev-tools-pages/ts/components/Animations/index.tsx @@ -21,16 +21,13 @@ class BaseAnimation extends React.PureComponent<AnimationProps, AnimationState> width: undefined, }; private _timeout = undefined as number; - public componentDidMount(): void { this._updateAnimationSize(); window.addEventListener('resize', this._handleResize); } - public componentWillUnmount(): void { window.removeEventListener('resize', this._handleResize); } - public render(): React.ReactNode { const { animationData } = this.props; const height = this.state.height || this.props.height; @@ -52,12 +49,10 @@ class BaseAnimation extends React.PureComponent<AnimationProps, AnimationState> </Container> ); } - private readonly _handleResize = () => { clearTimeout(this._timeout); this._timeout = window.setTimeout(this._updateAnimationSize, 50); }; - private readonly _updateAnimationSize = () => { const windowWidth = window.innerWidth; let width; diff --git a/packages/dev-tools-pages/ts/components/Code.tsx b/packages/dev-tools-pages/ts/components/Code.tsx index e29414d2d..72acc3865 100644 --- a/packages/dev-tools-pages/ts/components/Code.tsx +++ b/packages/dev-tools-pages/ts/components/Code.tsx @@ -141,7 +141,6 @@ class Code extends React.Component<CodeProps, CodeState> { // tslint:disable-next-line:no-floating-promises this._onMountAsync(); } - public render(): React.ReactNode { const { language, isLight, isDiff, children, gutterLength, canCopy } = this.props; const { hlCode } = this.state; @@ -174,7 +173,6 @@ class Code extends React.Component<CodeProps, CodeState> { </Container> ); } - private async _onMountAsync(): Promise<void> { const { language, children, isDiff, gutter, isEtc } = this.props; @@ -188,7 +186,6 @@ class Code extends React.Component<CodeProps, CodeState> { }); } } - private readonly _handleCopyAsync = async () => { try { if ('clipboard' in navigator) { |