diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/instant/src/components/zero_ex_instant_container.tsx | 13 |
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({ |