import { randomStr } from "@utils/helpers";
import { Component, linkEvent } from "inferno";
import { ListingType } from "lemmy-js-client";
-import { i18n } from "../../i18next";
-import { UserService } from "../../services";
+import { I18NextService, UserService } from "../../services";
interface ListingTypeSelectProps {
type_: ListingType;
<div className="listing-type-select btn-group btn-group-toggle flex-wrap">
{this.props.showSubscribed && (
<label
- title={i18n.t("subscribed_description")}
+ title={I18NextService.i18n.t("subscribed_description")}
className={`btn btn-outline-secondary
${this.state.type_ == "Subscribed" && "active"}
${!UserService.Instance.myUserInfo ? "disabled" : "pointer"}
onChange={linkEvent(this, this.handleTypeChange)}
disabled={!UserService.Instance.myUserInfo}
/>
- {i18n.t("subscribed")}
+ {I18NextService.i18n.t("subscribed")}
</label>
)}
{this.props.showLocal && (
<label
- title={i18n.t("local_description")}
+ title={I18NextService.i18n.t("local_description")}
className={`pointer btn btn-outline-secondary ${
this.state.type_ == "Local" && "active"
}`}
checked={this.state.type_ == "Local"}
onChange={linkEvent(this, this.handleTypeChange)}
/>
- {i18n.t("local")}
+ {I18NextService.i18n.t("local")}
</label>
)}
<label
- title={i18n.t("all_description")}
+ title={I18NextService.i18n.t("all_description")}
className={`pointer btn btn-outline-secondary ${
(this.state.type_ == "All" && "active") ||
(!this.props.showLocal && this.state.type_ == "Local" && "active")
checked={this.state.type_ == "All"}
onChange={linkEvent(this, this.handleTypeChange)}
/>
- {i18n.t("all")}
+ {I18NextService.i18n.t("all")}
</label>
</div>
);