From f519f5744e1742e13afe0cd915d6e314fcb579e8 Mon Sep 17 00:00:00 2001 From: August Skare Date: Mon, 19 Nov 2018 09:55:03 +0100 Subject: remove new-lines between methods in classes --- packages/dev-tools-pages/ts/components/Animations/index.tsx | 5 ----- packages/dev-tools-pages/ts/components/Code.tsx | 3 --- 2 files changed, 8 deletions(-) (limited to 'packages/dev-tools-pages/ts/components') 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 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 ); } - 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 { // 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 { ); } - private async _onMountAsync(): Promise { const { language, children, isDiff, gutter, isEtc } = this.props; @@ -188,7 +186,6 @@ class Code extends React.Component { }); } } - private readonly _handleCopyAsync = async () => { try { if ('clipboard' in navigator) { -- cgit