GetPersonDetailsResponse,
GetSiteResponse,
} from "lemmy-js-client";
-import { i18n } from "../../i18next";
import { InitialFetchRequest } from "../../interfaces";
-import { FirstLoadService } from "../../services/FirstLoadService";
+import { FirstLoadService, I18NextService } from "../../services";
import { HttpService, RequestState } from "../../services/HttpService";
import { toast } from "../../toast";
import { HtmlTags } from "../common/html-tags";
get documentTitle(): string {
if (this.state.recipientRes.state == "success") {
const name_ = this.state.recipientRes.data.person_view.person.name;
- return `${i18n.t("create_private_message")} - ${name_}`;
+ return `${I18NextService.i18n.t("create_private_message")} - ${name_}`;
} else {
return "";
}
return (
<div className="row">
<div className="col-12 col-lg-6 offset-lg-3 mb-4">
- <h5>{i18n.t("create_private_message")}</h5>
+ <h5>{I18NextService.i18n.t("create_private_message")}</h5>
<PrivateMessageForm
onCreate={this.handlePrivateMessageCreate}
recipient={res.person_view.person}
const res = await HttpService.client.createPrivateMessage(form);
if (res.state == "success") {
- toast(i18n.t("message_sent"));
+ toast(I18NextService.i18n.t("message_sent"));
// Navigate to the front
this.context.router.history.push("/");