aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-20 03:05:57 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-10-20 03:05:57 +0800
commit6f80c7e6d94124d16685853b0928f725a262e09e (patch)
treec9503f1e83f84fc4482540a93c372272474a9460 /packages/instant
parent6588cf919ef70f54754b1428df51e967b817788a (diff)
downloaddexon-sol-tools-6f80c7e6d94124d16685853b0928f725a262e09e.tar
dexon-sol-tools-6f80c7e6d94124d16685853b0928f725a262e09e.tar.gz
dexon-sol-tools-6f80c7e6d94124d16685853b0928f725a262e09e.tar.bz2
dexon-sol-tools-6f80c7e6d94124d16685853b0928f725a262e09e.tar.lz
dexon-sol-tools-6f80c7e6d94124d16685853b0928f725a262e09e.tar.xz
dexon-sol-tools-6f80c7e6d94124d16685853b0928f725a262e09e.tar.zst
dexon-sol-tools-6f80c7e6d94124d16685853b0928f725a262e09e.zip
arrow function syntax so no need to bind
Diffstat (limited to 'packages/instant')
-rw-r--r--packages/instant/src/components/instant_heading.tsx14
1 files changed, 6 insertions, 8 deletions
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<InstantHeadingProps, {}> {
<Flex direction="row" justify="space-between">
<SelectedAssetAmountInput fontSize="45px" />
<Flex direction="column" justify="space-between">
- <Container marginBottom="5px">
- {this._placeholderOrAmount(this._ethAmount.bind(this))}
- </Container>
- <Container opacity={0.7}>{this._placeholderOrAmount(this._dollarAmount.bind(this))}</Container>
+ <Container marginBottom="5px">{this._placeholderOrAmount(this._ethAmount)}</Container>
+ <Container opacity={0.7}>{this._placeholderOrAmount(this._dollarAmount)}</Container>
</Flex>
</Flex>
</Container>
@@ -62,7 +60,7 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> {
return amountFunction();
}
- private _ethAmount(): React.ReactNode {
+ private _ethAmount = (): React.ReactNode => {
return (
<Text fontSize="16px" fontColor={ColorOption.white} fontWeight={500}>
{format.ethBaseAmount(
@@ -72,9 +70,9 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> {
)}
</Text>
);
- }
+ };
- private _dollarAmount(): React.ReactNode {
+ private _dollarAmount = (): React.ReactNode => {
return (
<Text fontSize="16px" fontColor={ColorOption.white}>
{format.ethBaseAmountInUsd(
@@ -85,5 +83,5 @@ export class InstantHeading extends React.Component<InstantHeadingProps, {}> {
)}
</Text>
);
- }
+ };
}