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

63 lines
1.9 KiB
TypeScript
Raw Normal View History

2021-02-22 02:39:04 +00:00
import { Component } from "inferno";
import { NavLink } from "inferno-router";
2021-02-22 02:39:04 +00:00
import { GetSiteResponse } from "lemmy-js-client";
import { i18n } from "../../i18next";
import { docsUrl, joinLemmyUrl, repoUrl } from "../../utils";
import { VERSION } from "../../version";
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">
{this.props.site.version !== VERSION && (
<li class="nav-item">
<span class="nav-link">UI: {VERSION}</span>
</li>
)}
<li class="nav-item">
<span class="nav-link">BE: {this.props.site.version}</span>
</li>
<li className="nav-item">
<NavLink className="nav-link" to="/modlog">
2021-02-22 02:39:04 +00:00
{i18n.t("modlog")}
</NavLink>
</li>
2021-02-01 18:08:45 +00:00
{this.props.site.federated_instances && (
<li class="nav-item">
<NavLink className="nav-link" to="/instances">
2021-02-22 02:39:04 +00:00
{i18n.t("instances")}
</NavLink>
2021-02-01 18:08:45 +00:00
</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>
);
}
}