lbry-desktop/ui/js/component/userEmailVerify/index.jsx

26 lines
626 B
React
Raw Normal View History

2017-06-03 01:09:52 +02:00
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)