Remove <UserEmail> -- I think it was a Desktop thing
This commit is contained in:
parent
71328274ec
commit
0c9859e3ac
3 changed files with 0 additions and 92 deletions
|
@ -567,7 +567,6 @@
|
||||||
"Embedded": "Embedded",
|
"Embedded": "Embedded",
|
||||||
"Failed to load %language% translations.": "Failed to load %language% translations.",
|
"Failed to load %language% translations.": "Failed to load %language% translations.",
|
||||||
"odysee.com Account": "odysee.com Account",
|
"odysee.com Account": "odysee.com Account",
|
||||||
"Creating a odysee.com account will allow you to earn rewards, receive content and security updates, and optionally backup your data.": "Creating a odysee.com account will allow you to earn rewards, receive content and security updates, and optionally backup your data.",
|
|
||||||
"Paid content cannot be embedded": "Paid content cannot be embedded",
|
"Paid content cannot be embedded": "Paid content cannot be embedded",
|
||||||
"This content cannot be embedded": "This content cannot be embedded",
|
"This content cannot be embedded": "This content cannot be embedded",
|
||||||
"Your videos are ready to be transferred.": "Your videos are ready to be transferred.",
|
"Your videos are ready to be transferred.": "Your videos are ready to be transferred.",
|
||||||
|
|
|
@ -1,18 +0,0 @@
|
||||||
import { connect } from 'react-redux';
|
|
||||||
import { doUserResendVerificationEmail, doUserCheckEmailVerified, doFetchAccessToken } from 'redux/actions/user';
|
|
||||||
import { selectEmailToVerify, selectUser, selectAccessToken } from 'redux/selectors/user';
|
|
||||||
import UserEmailVerify from './view';
|
|
||||||
|
|
||||||
const select = state => ({
|
|
||||||
email: selectEmailToVerify(state),
|
|
||||||
user: selectUser(state),
|
|
||||||
accessToken: selectAccessToken(state),
|
|
||||||
});
|
|
||||||
|
|
||||||
const perform = dispatch => ({
|
|
||||||
resendVerificationEmail: email => dispatch(doUserResendVerificationEmail(email)),
|
|
||||||
checkEmailVerified: () => dispatch(doUserCheckEmailVerified()),
|
|
||||||
fetchAccessToken: () => dispatch(doFetchAccessToken()),
|
|
||||||
});
|
|
||||||
|
|
||||||
export default connect(select, perform)(UserEmailVerify);
|
|
|
@ -1,73 +0,0 @@
|
||||||
// @flow
|
|
||||||
import * as PAGES from 'constants/pages';
|
|
||||||
import type { Node } from 'react';
|
|
||||||
import React, { useEffect } from 'react';
|
|
||||||
import Button from 'component/button';
|
|
||||||
import { FormField } from 'component/common/form';
|
|
||||||
import UserSignOutButton from 'component/userSignOutButton';
|
|
||||||
import Card from 'component/common/card';
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
cancelButton: Node,
|
|
||||||
email: string,
|
|
||||||
resendVerificationEmail: (string) => void,
|
|
||||||
checkEmailVerified: () => void,
|
|
||||||
user: {
|
|
||||||
has_verified_email: boolean,
|
|
||||||
},
|
|
||||||
fetchAccessToken: () => void,
|
|
||||||
accessToken: string,
|
|
||||||
};
|
|
||||||
|
|
||||||
function UserEmail(props: Props) {
|
|
||||||
const { email, user, accessToken, fetchAccessToken } = props;
|
|
||||||
|
|
||||||
let isVerified = false;
|
|
||||||
if (user) {
|
|
||||||
isVerified = user.has_verified_email;
|
|
||||||
}
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!accessToken) {
|
|
||||||
fetchAccessToken();
|
|
||||||
}
|
|
||||||
}, [accessToken, fetchAccessToken]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Card
|
|
||||||
title={__('odysee.com Account')}
|
|
||||||
subtitle={
|
|
||||||
isVerified
|
|
||||||
? undefined
|
|
||||||
: __(
|
|
||||||
'Creating a odysee.com account will allow you to earn rewards, receive content and security updates, and optionally backup your data.'
|
|
||||||
)
|
|
||||||
}
|
|
||||||
actions={
|
|
||||||
isVerified ? (
|
|
||||||
<FormField
|
|
||||||
type="text"
|
|
||||||
className="form-field--copyable"
|
|
||||||
readOnly
|
|
||||||
label={
|
|
||||||
<React.Fragment>
|
|
||||||
{__('Your email')}{' '}
|
|
||||||
<Button
|
|
||||||
button="link"
|
|
||||||
label={__('Update mailing preferences')}
|
|
||||||
href={`http://lbry.io/list/edit/${accessToken}`}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
|
||||||
}
|
|
||||||
inputButton={<UserSignOutButton button="secondary" />}
|
|
||||||
value={email || ''}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<Button button="primary" label={__('Log In')} navigate={`/$/${PAGES.AUTH}`} />
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default UserEmail;
|
|
Loading…
Reference in a new issue