aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/selected_asset_retry_button.tsx
blob: b2b140be63ac88917678eeb5ec57313315e326cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import * as _ from 'lodash';
import * as React from 'react';
import { connect } from 'react-redux';
import { Dispatch } from 'redux';

import { Action, actions } from '../redux/actions';

import { RetryButton } from '../components/retry_button';

export interface SelectedAssetRetryButtonProps {}

interface ConnectedDispatch {
    onClick: () => void;
}

const mapDispatchToProps = (
    dispatch: Dispatch<Action>,
    _ownProps: SelectedAssetRetryButtonProps,
): ConnectedDispatch => ({
    onClick: () => dispatch(actions.resetAmount()),
});

export const SelectedAssetRetryButton: React.ComponentClass<SelectedAssetRetryButtonProps> = connect(
    undefined,
    mapDispatchToProps,
)(RetryButton);