Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix linting warnings
  • Loading branch information
tdemin committed Nov 10, 2019
1 parent 989309a commit 7d37b40
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/views/signupForm.tsx
Expand Up @@ -58,6 +58,7 @@ class SignupForm extends React.PureComponent<RCP, State> {
signup = () => {
this.setState({ status: Status.IN_PROCESS });
// prettier-ignore
/* eslint-disable */
req.post("/signup", {
name: this.state.name,
password: this.state.password,
Expand All @@ -69,21 +70,24 @@ class SignupForm extends React.PureComponent<RCP, State> {
httpCode: (e.response as AxiosResponse).status
})
);
/* eslint-enable */
};
goBack = () => this.props.history.push("/");
updateName = (e: React.FormEvent<HTMLInputElement>) =>
this.setState({ name: e.currentTarget.value });
updatePassword = (e: React.FormEvent<HTMLInputElement>) =>
this.setState({ password: e.currentTarget.value });
render = () => {
let message: string;
let msg: string;
switch (this.state.httpCode) {
case Errors.FORBIDDEN:
message = strings.signup_disabled;
msg = strings.signup_disabled;
break;
case Errors.USER_EXISTS:
message = strings.signup_userExists;
msg = strings.signup_userExists;
break;
default:
message = strings.signup_unknownError;
msg = strings.signup_unknownError;
}
return (
<div className="container signup_form">
Expand Down Expand Up @@ -128,7 +132,7 @@ class SignupForm extends React.PureComponent<RCP, State> {
<Msg
code={this.state.status}
matchCode={Status.FAILED}
message={`${strings.signup_failMsg}: ${message}`}
message={`${strings.signup_failMsg}: ${msg}`}
/>
<Msg
code={this.state.status}
Expand Down

0 comments on commit 7d37b40

Please sign in to comment.