1 import { Component } from "inferno";
2 import { setIsoData } from "../../utils";
3 import { ErrorPage } from "../app/error-page";
5 class ErrorGuard extends Component<any, any> {
6 private isoData = setIsoData(this.context);
8 constructor(props: any, context: any) {
13 const errorPageData = this.isoData.errorPageData;
14 const siteRes = this.isoData.site_res;
15 console.log("In error guard");
16 console.log(errorPageData);
18 if (errorPageData || !siteRes) {
19 console.log("triggered error page");
22 return this.props.children;
27 export default ErrorGuard;