import {connect} from 'react-redux'
import {getUser} from 'store/selectors'
import {showToast} from 'store/actions'
import CardUpdateForm from './component'
import toastTypes from 'containers/toast-manager/toast-types'

const mapDispatchToProps = (dispatch) => {
    return {
        showToast: () =>
            dispatch(showToast({type: toastTypes.CARD_UPDATED_SUCCESS})),
    }
}

const mapStateToProps = (state) => {
    return {
        user: getUser(state),
    }
}

export default connect(mapStateToProps, mapDispatchToProps)(CardUpdateForm)
