lemmy-ui/src/shared/components/footer.tsx

57 lines
1.6 KiB
TypeScript
Raw Normal View History

2021-02-22 02:39:04 +00:00
import { Component } from "inferno";
import { Link } from "inferno-router";
import { i18n } from "../i18next";
import { repoUrl, joinLemmyUrl, docsUrl } from "../utils";
import { GetSiteResponse } from "lemmy-js-client";
2020-09-09 03:13:26 +00:00
interface FooterProps {
site: GetSiteResponse;
}
export class Footer extends Component<FooterProps, any> {
constructor(props: any, context: any) {
super(props, context);
}
render() {
return (
2021-03-25 16:29:20 +00:00
<nav class="container navbar navbar-expand-md navbar-light navbar-bg p-3">
<div className="navbar-collapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
2020-09-09 03:13:26 +00:00
<span class="navbar-text">{this.props.site.version}</span>
</li>
<li className="nav-item">
<Link className="nav-link" to="/modlog">
2021-02-22 02:39:04 +00:00
{i18n.t("modlog")}
</Link>
</li>
2021-02-01 18:08:45 +00:00
{this.props.site.federated_instances && (
<li class="nav-item">
<Link className="nav-link" to="/instances">
2021-02-22 02:39:04 +00:00
{i18n.t("instances")}
2021-02-01 18:08:45 +00:00
</Link>
</li>
)}
<li class="nav-item">
2021-01-06 21:06:42 +00:00
<a className="nav-link" href={docsUrl}>
2021-02-22 02:39:04 +00:00
{i18n.t("docs")}
</a>
</li>
<li class="nav-item">
<a className="nav-link" href={repoUrl}>
2021-02-22 02:39:04 +00:00
{i18n.t("code")}
</a>
</li>
<li class="nav-item">
<a className="nav-link" href={joinLemmyUrl}>
2021-02-22 02:39:04 +00:00
{i18n.t("join_lemmy")}
</a>
</li>
</ul>
</div>
</nav>
);
}
}