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

22 lines
602 B
React
Raw Normal View History

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