import { LemmyHttp } from "lemmy-js-client";
import { getHttpBase } from "../../shared/env";
-import { i18n } from "../../shared/i18next";
import { toast } from "../../shared/toast";
+import { I18NextService } from "./I18NextService";
type EmptyRequestState = {
state: "empty";
};
} catch (error) {
console.error(`API error: ${error}`);
- toast(i18n.t(error), "danger");
+ toast(I18NextService.i18n.t(error), "danger");
return {
state: "failed",
msg: error,