aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/components/zero_ex_instant_container.tsx
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-28 02:00:21 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-28 02:00:21 +0800
commit9c27feeff61ab38771709b3f4ccd1fb1ff29e1d2 (patch)
tree6cfd37ecfe5ea4d9255e4627112d6aa85997386b /packages/instant/src/components/zero_ex_instant_container.tsx
parentee5b6ad77ffac9aca00035a6bc50cdbf25caf348 (diff)
downloaddexon-sol-tools-9c27feeff61ab38771709b3f4ccd1fb1ff29e1d2.tar.gz
dexon-sol-tools-9c27feeff61ab38771709b3f4ccd1fb1ff29e1d2.tar.zst
dexon-sol-tools-9c27feeff61ab38771709b3f4ccd1fb1ff29e1d2.zip
Make explicit functions
Diffstat (limited to 'packages/instant/src/components/zero_ex_instant_container.tsx')
-rw-r--r--packages/instant/src/components/zero_ex_instant_container.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx
index 1e74cf41c..8a809ee31 100644
--- a/packages/instant/src/components/zero_ex_instant_container.tsx
+++ b/packages/instant/src/components/zero_ex_instant_container.tsx
@@ -28,13 +28,6 @@ export class ZeroExInstantContainer extends React.Component<ZeroExInstantContain
public state = {
tokenSelectionPanelAnimationState: 'none' as SlideAnimationState,
};
- private readonly _handlePanelCloseClickedX: () => void;
- private readonly _handlePanelCloseAfterChose: () => void;
- public constructor(props: ZeroExInstantContainerProps) {
- super(props);
- this._handlePanelCloseClickedX = this._handlePanelClose.bind(this, TokenSelectorClosedVia.ClickedX);
- this._handlePanelCloseAfterChose = this._handlePanelClose.bind(this, TokenSelectorClosedVia.TokenChose);
- }
public render(): React.ReactNode {
return (
<React.Fragment>
@@ -93,6 +86,12 @@ export class ZeroExInstantContainer extends React.Component<ZeroExInstantContain
tokenSelectionPanelAnimationState: 'slidIn',
});
};
+ private readonly _handlePanelCloseClickedX = (): void => {
+ this._handlePanelClose(TokenSelectorClosedVia.ClickedX);
+ };
+ private readonly _handlePanelCloseAfterChose = (): void => {
+ this._handlePanelClose(TokenSelectorClosedVia.TokenChose);
+ };
private readonly _handlePanelClose = (closedVia: TokenSelectorClosedVia): void => {
analytics.trackTokenSelectorClosed(closedVia);
this.setState({