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

22 lines
602 B
JavaScript
Raw Normal View History

2017-06-07 20:56:52 -04:00
import React from "react";
import { connect } from "react-redux";
import { doUserEmailVerify } from "actions/user";
2017-06-02 19:09:52 -04:00
import {
selectEmailVerifyIsPending,
2017-06-07 20:56:52 -04:00
selectEmailToVerify,
2017-06-02 19:09:52 -04:00
selectEmailVerifyErrorMessage,
2017-06-07 20:56:52 -04:00
} from "selectors/user";
import UserEmailVerify from "./view";
2017-06-02 19:09:52 -04:00
2017-06-07 20:56:52 -04:00
const select = state => ({
2017-06-02 19:09:52 -04:00
isPending: selectEmailVerifyIsPending(state),
2017-06-08 17:15:34 -04:00
email: selectEmailToVerify(state),
2017-06-02 19:09:52 -04:00
errorMessage: selectEmailVerifyErrorMessage(state),
2017-06-07 20:56:52 -04:00
});
2017-06-02 19:09:52 -04:00
2017-06-07 20:56:52 -04:00
const perform = dispatch => ({
verifyUserEmail: code => dispatch(doUserEmailVerify(code)),
});
2017-06-02 19:09:52 -04:00
2017-06-07 20:56:52 -04:00
export default connect(select, perform)(UserEmailVerify);