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

23 lines
648 B
React
Raw Normal View History

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