X-Git-Url: http://these/git/?a=blobdiff_plain;f=src%2Fshared%2Fcomponents%2Fperson%2Fpassword-change.tsx;h=565f55e6ce2853d0be7c6e53bf294d2a163a0632;hb=c3ab9e74f8775f4b811866d2675b00f9702bde3d;hp=b36c15a297f12526682bcd2c06760435ad5800cc;hpb=c77086a9d57201323c2fd2a45f0607579dd693a0;p=lemmy-ui.git diff --git a/src/shared/components/person/password-change.tsx b/src/shared/components/person/password-change.tsx index b36c15a..565f55e 100644 --- a/src/shared/components/person/password-change.tsx +++ b/src/shared/components/person/password-change.tsx @@ -1,9 +1,9 @@ +import { myAuth, setIsoData } from "@utils/app"; +import { capitalizeFirstLetter } from "@utils/helpers"; import { Component, linkEvent } from "inferno"; import { GetSiteResponse, LoginResponse } from "lemmy-js-client"; -import { i18n } from "../../i18next"; -import { HttpService, UserService } from "../../services"; +import { HttpService, I18NextService, UserService } from "../../services"; import { RequestState } from "../../services/HttpService"; -import { capitalizeFirstLetter, myAuth, setIsoData } from "../../utils"; import { HtmlTags } from "../common/html-tags"; import { Spinner } from "../common/icon"; @@ -33,21 +33,23 @@ export class PasswordChange extends Component { } get documentTitle(): string { - return `${i18n.t("password_change")} - ${ + return `${I18NextService.i18n.t("password_change")} - ${ this.state.siteRes.site_view.site.name }`; } render() { return ( -
+
-
{i18n.t("password_change")}
+

+ {I18NextService.i18n.t("password_change")} +

{this.passwordChangeForm()}
@@ -60,7 +62,7 @@ export class PasswordChange extends Component {
{
{ {this.state.passwordChangeRes.state == "loading" ? ( ) : ( - capitalizeFirstLetter(i18n.t("save")) + capitalizeFirstLetter(I18NextService.i18n.t("save")) )}
@@ -133,7 +135,9 @@ export class PasswordChange extends Component { if (i.state.passwordChangeRes.state === "success") { const data = i.state.passwordChangeRes.data; - UserService.Instance.login(data); + UserService.Instance.login({ + res: data, + }); const site = await HttpService.client.getSite({ auth: myAuth() }); if (site.state === "success") {