1 import { Component } from "inferno";
2 import { Link } from "inferno-router";
3 import { ErrorPageData, setIsoData } from "../../utils";
5 export class ErrorPage extends Component<any, any> {
6 private isoData = setIsoData(this.context);
8 constructor(props: any, context: any) {
13 const errorPageData = this.getErrorPageData();
16 <div className="container-lg text-center">
17 <h1>{errorPageData ? "Error!" : "Page Not Found"}</h1>
20 ? 'There was an error on the server. Try refreshing your browser. If that doesn\'t work, come back at a later time. If the problem persists, <a href="https://github.com/LemmyNet/lemmy/issues">consider opening an issue.</a>'
21 : "The page you are looking for does not exist"}
24 <Link to="/">Click here to return to your home page</Link>
26 {errorPageData?.adminMatrixIds &&
27 errorPageData.adminMatrixIds.length > 0 && (
30 If you would like to reach out to one of{" "}
31 {this.isoData.site_res.site_view.site.name}'s admins for
32 support, try the following Matrix addresses:
35 {errorPageData.adminMatrixIds.map(matrixId => (
36 <li key={matrixId}>{matrixId}</li>
41 {errorPageData?.error && (
42 <code className="text-start">{errorPageData.error}</code>
48 private getErrorPageData() {
49 const errorPageData = this.isoData.routeData[0] as
52 if (errorPageData?.type === "error") {