lbry-desktop/ui/js/component/auth/view.jsx

23 lines
648 B
React
Raw Normal View History

2017-06-08 02:56:52 +02:00
import React from "react";
import { BusyMessage } from "component/common";
import UserEmailNew from "component/userEmailNew";
import UserEmailVerify from "component/userEmailVerify";
2017-05-17 10:10:25 +02:00
export class Auth extends React.PureComponent {
2017-05-17 10:10:25 +02:00
render() {
2017-06-08 02:56:52 +02:00
const { isPending, email, isVerificationCandidate } = this.props;
2017-06-03 01:09:52 +02:00
if (isPending) {
2017-06-08 02:56:52 +02:00
return <BusyMessage message={__("Authenticating")} />;
} else if (!email) {
return <UserEmailNew />;
} else if (isVerificationCandidate) {
return <UserEmailVerify />;
2017-06-03 01:09:52 +02:00
} else {
2017-06-08 02:56:52 +02:00
return <span className="empty">{__("No further steps.")}</span>;
}
2017-05-17 10:10:25 +02:00
}
}
2017-05-26 10:53:32 +02:00
2017-06-08 02:56:52 +02:00
export default Auth;