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
|
|
|
|
2017-06-08 20:10:53 -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-04-20 10:45:39 -04:00
|
|
|
}
|
2017-05-17 04:10:25 -04:00
|
|
|
}
|
2017-05-26 02:16:25 +02:00
|
|
|
}
|
2017-05-26 12:53:32 +04:00
|
|
|
|
2017-06-07 20:56:52 -04:00
|
|
|
export default Auth;
|