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">
17 <h1>{errorPageData ? "Error!" : "Page Not Found"}</h1>
20 ? "There was an error on the server. Try refreshing your browser of coming back at a later time"
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 && <code>{errorPageData.error.message}</code>}
46 private getErrorPageData() {
47 const errorPageData = this.isoData.routeData[0] as
50 if (errorPageData?.type === "error") {