lemmy-ui/src/shared/components/no-match.tsx

27 lines
560 B
TypeScript
Raw Normal View History

2021-03-01 20:44:02 +00:00
import { I18nKeys } from "i18next";
2021-02-22 02:39:04 +00:00
import { Component } from "inferno";
import { i18n } from "../i18next";
2020-11-10 18:24:47 +00:00
export class NoMatch extends Component<any, any> {
2021-03-01 20:44:02 +00:00
private errCode = new URLSearchParams(this.props.location.search).get(
"err"
) as I18nKeys;
2020-11-10 22:45:59 +00:00
2020-11-10 18:24:47 +00:00
constructor(props: any, context: any) {
super(props, context);
}
render() {
return (
<div class="container">
<h1>404</h1>
2020-11-10 22:45:59 +00:00
{this.errCode && (
<h3>
2021-02-22 02:39:04 +00:00
{i18n.t("code")}: {i18n.t(this.errCode)}
2020-11-10 22:45:59 +00:00
</h3>
)}
2020-11-10 18:24:47 +00:00
</div>
);
}
}