aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/selected_asset_retry_button.tsx
blob: 30e564c7b02151922d380742913316d2e6ae0878 (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
27
28
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 {
    width?: string;
}

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

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

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