2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2017-06-03 01:09:52 +02:00
|
|
|
import {
|
2017-06-08 02:56:52 +02:00
|
|
|
selectEmailToVerify,
|
2018-09-24 05:44:42 +02:00
|
|
|
doUserResendVerificationEmail,
|
2019-01-09 06:01:45 +01:00
|
|
|
doUserCheckEmailVerified,
|
2019-01-08 03:46:33 +01:00
|
|
|
selectUser,
|
2018-09-24 05:44:42 +02:00
|
|
|
} from 'lbryinc';
|
2019-01-08 03:46:33 +01:00
|
|
|
import { doNavigate } from 'redux/actions/navigation';
|
2017-12-21 22:08:54 +01:00
|
|
|
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-08 23:15:34 +02:00
|
|
|
email: selectEmailToVerify(state),
|
2019-01-08 03:46:33 +01:00
|
|
|
user: selectUser(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 => ({
|
2018-06-07 03:47:49 +02:00
|
|
|
resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email)),
|
2019-01-09 06:01:45 +01:00
|
|
|
checkEmailVerified: () => dispatch(doUserCheckEmailVerified()),
|
2019-01-08 03:46:33 +01:00
|
|
|
navigate: path => dispatch(doNavigate(path)),
|
2017-06-08 02:56:52 +02:00
|
|
|
});
|
2017-06-03 01:09:52 +02:00
|
|
|
|
2018-09-24 05:44:42 +02:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(UserEmailVerify);
|