import { Fragment } from 'react'; <% if (styleFramework === 'bootstrap') { %> import { Container } from 'react-bootstrap'; <% } else if (styleFramework === 'foundation') { %> import { GridContainer as Container } from 'react-foundation'; <% } else if (styleFramework === 'materialize') { %> import { Container } from 'react-materialize'; <% } else if (styleFramework === 'uikit') { %> import { Container } from 'uikit-react'; <% } else if (styleFramework === 'materialUi') { %> import { Container } from '@mui/material'; <% } %> import { isRouteErrorResponse, useRouteError } from 'react-router'; export default function ErrorBoundary() { const error = useRouteError(); return ( <% if (styleFramework === 'bulma') { %>
<% } else if (styleFramework) { %> <% } else { %>
<% } %>

Error

{isRouteErrorResponse(error) ? (

{error.status} {error.statusText}

) : error instanceof Error ? (

{error.message}

{error.stack}
) : (

{error as string}

)} <% if (styleFramework && styleFramework !== 'bulma') { %> <% } else { %>
<% } %> ); }