lbry-desktop/ui/js/component/userEmailVerify/index.jsx
2017-06-07 12:11:47 -04:00

25 lines
626 B
JavaScript

import React from 'react'
import {
connect
} from 'react-redux'
import {
doUserEmailVerify
} from 'actions/user'
import {
selectEmailVerifyIsPending,
selectEmailNewExistingEmail,
selectEmailVerifyErrorMessage,
} from 'selectors/user'
import UserEmailVerify from './view'
const select = (state) => ({
isPending: selectEmailVerifyIsPending(state),
email: selectEmailNewExistingEmail,
errorMessage: selectEmailVerifyErrorMessage(state),
})
const perform = (dispatch) => ({
verifyUserEmail: (email, code) => dispatch(doUserEmailVerify(email, code))
})
export default connect(select, perform)(UserEmailVerify)