mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-28 16:01:26 +00:00
fix: email verify modal button placement
This commit is contained in:
parent
da96f28794
commit
8b249a20a5
2 changed files with 19 additions and 7 deletions
|
@ -8,6 +8,7 @@ type Props = {
|
||||||
errorMessage: ?string,
|
errorMessage: ?string,
|
||||||
email: string,
|
email: string,
|
||||||
isPending: boolean,
|
isPending: boolean,
|
||||||
|
onModal?: boolean,
|
||||||
verifyUserEmail: (string, string) => void,
|
verifyUserEmail: (string, string) => void,
|
||||||
verifyUserEmailFailure: string => void,
|
verifyUserEmailFailure: string => void,
|
||||||
resendVerificationEmail: string => void,
|
resendVerificationEmail: string => void,
|
||||||
|
@ -50,7 +51,7 @@ class UserEmailVerify extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { cancelButton, errorMessage, email, isPending } = this.props;
|
const { cancelButton, errorMessage, email, isPending, onModal } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Form onSubmit={this.handleSubmit}>
|
<Form onSubmit={this.handleSubmit}>
|
||||||
|
@ -77,12 +78,23 @@ class UserEmailVerify extends React.PureComponent<Props, State> {
|
||||||
<div className="card__actions">
|
<div className="card__actions">
|
||||||
<Submit label={__('Verify')} disabled={isPending} />
|
<Submit label={__('Verify')} disabled={isPending} />
|
||||||
{cancelButton}
|
{cancelButton}
|
||||||
<Button
|
{!onModal && (
|
||||||
button="link"
|
<Button
|
||||||
label={__('Resend verification email')}
|
button="link"
|
||||||
onClick={this.handleResendVerificationEmail}
|
label={__('Resend verification email')}
|
||||||
/>
|
onClick={this.handleResendVerificationEmail}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{onModal && (
|
||||||
|
<div className="card__actions help">
|
||||||
|
<Button
|
||||||
|
button="link"
|
||||||
|
label={__('Resend verification email')}
|
||||||
|
onClick={this.handleResendVerificationEmail}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ class ModalEmailCollection extends React.PureComponent<Props> {
|
||||||
if (user && !user.has_verified_email && !email) {
|
if (user && !user.has_verified_email && !email) {
|
||||||
return <UserEmailNew cancelButton={cancelButton} />;
|
return <UserEmailNew cancelButton={cancelButton} />;
|
||||||
} else if (user && !user.has_verified_email) {
|
} else if (user && !user.has_verified_email) {
|
||||||
return <UserEmailVerify cancelButton={cancelButton} />;
|
return <UserEmailVerify onModal cancelButton={cancelButton} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return closeModal();
|
return closeModal();
|
||||||
|
|
Loading…
Add table
Reference in a new issue