import { Component } from "inferno"; import { Provider } from "inferno-i18next-dess"; import { Route, Switch } from "inferno-router"; import { i18n } from "../../i18next"; import { IsoDataOptionalSite } from "../../interfaces"; import { routes } from "../../routes"; import { isAuthPath, setIsoData } from "../../utils"; import AuthGuard from "../common/auth-guard"; import ErrorGuard from "../common/error-guard"; import { ErrorPage } from "./error-page"; import { Footer } from "./footer"; import { Navbar } from "./navbar"; import "./styles.scss"; import { Theme } from "./theme"; export class App extends Component { private isoData: IsoDataOptionalSite = setIsoData(this.context); constructor(props: any, context: any) { super(props, context); } render() { const siteRes = this.isoData.site_res; const siteView = siteRes?.site_view; return ( <>
{siteView && ( )}
{routes.map(({ path, component: RouteComponent }) => ( ( {RouteComponent && (isAuthPath(path ?? "") ? ( ) : ( ))} )} /> ))}
); } }