Fixing verify email.
This commit is contained in:
parent
f7cb97eef4
commit
f5cf816c39
1 changed files with 1 additions and 24 deletions
|
@ -1,11 +1,5 @@
|
|||
import { Component } from "inferno";
|
||||
import {
|
||||
GetSiteResponse,
|
||||
UserOperation,
|
||||
VerifyEmailResponse,
|
||||
wsJsonToRes,
|
||||
wsUserOp,
|
||||
} from "lemmy-js-client";
|
||||
import { GetSiteResponse, VerifyEmailResponse } from "lemmy-js-client";
|
||||
import { i18n } from "../../i18next";
|
||||
import { HttpService, RequestState } from "../../services/HttpService";
|
||||
import { setIsoData, toast } from "../../utils";
|
||||
|
@ -76,21 +70,4 @@ export class VerifyEmail extends Component<any, State> {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
parseMessage(msg: any) {
|
||||
let op = wsUserOp(msg);
|
||||
console.log(msg);
|
||||
if (msg.error) {
|
||||
toast(i18n.t(msg.error), "danger");
|
||||
this.setState(this.state);
|
||||
this.props.history.push("/");
|
||||
return;
|
||||
} else if (op == UserOperation.VerifyEmail) {
|
||||
let data = wsJsonToRes(msg);
|
||||
if (data) {
|
||||
toast(i18n.t("email_verified"));
|
||||
this.props.history.push("/login");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue