aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/containers/connected_account_payment_method.ts
blob: ea9531a3e2bd3c2f5feb4a083106dd32c3aa5bd3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import * as React from 'react';
import { connect } from 'react-redux';

import { State } from '../redux/reducer';
import { Account } from '../types';

import { PaymentMethod } from '../components/payment_method';

export interface ConnectedAccountPaymentMethodProps {}

interface ConnectedState {
    account: Account;
}

const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({
    account: state.providerState.account,
});

export const ConnectedAccountPaymentMethod: React.ComponentClass<ConnectedAccountPaymentMethodProps> = connect(
    mapStateToProps,
)(PaymentMethod);