import { Component } from "inferno"; import { Link } from "inferno-router"; import { IsoDataOptionalSite } from "shared/interfaces"; import { setIsoData } from "../../utils"; export class ErrorPage extends Component { private isoData: IsoDataOptionalSite = setIsoData(this.context); constructor(props: any, context: any) { super(props, context); } render() { const { errorPageData } = this.isoData; return (

{errorPageData ? "Error!" : "Page Not Found"}

{errorPageData ? ( <> 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, {" "} consider opening an issue. ) : ( "The page you are looking for does not exist." )}

{!errorPageData && ( Click here to return to your home page. )} {errorPageData?.adminMatrixIds && errorPageData.adminMatrixIds.length > 0 && ( <>
If you would like to reach out to one of{" "} {this.isoData.site_res?.site_view.site.name ?? "this instance"} 's admins for support, try the following Matrix addresses:
)} {errorPageData?.error && ( {errorPageData.error} )}
); } }