From 6f80c7e6d94124d16685853b0928f725a262e09e Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 19 Oct 2018 12:05:57 -0700 Subject: arrow function syntax so no need to bind --- packages/instant/src/components/instant_heading.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'packages/instant/src') diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 265c3e0a5..625961b84 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -42,10 +42,8 @@ export class InstantHeading extends React.Component { - - {this._placeholderOrAmount(this._ethAmount.bind(this))} - - {this._placeholderOrAmount(this._dollarAmount.bind(this))} + {this._placeholderOrAmount(this._ethAmount)} + {this._placeholderOrAmount(this._dollarAmount)} @@ -62,7 +60,7 @@ export class InstantHeading extends React.Component { return amountFunction(); } - private _ethAmount(): React.ReactNode { + private _ethAmount = (): React.ReactNode => { return ( {format.ethBaseAmount( @@ -72,9 +70,9 @@ export class InstantHeading extends React.Component { )} ); - } + }; - private _dollarAmount(): React.ReactNode { + private _dollarAmount = (): React.ReactNode => { return ( {format.ethBaseAmountInUsd( @@ -85,5 +83,5 @@ export class InstantHeading extends React.Component { )} ); - } + }; } -- cgit v1.2.3