import React from 'react'; import type { FallbackProps } from './error-boundary'; // ───────────────────────────────────────────────────────────────────────────── // error-fallbacks.tsx // // Three UI fallbacks for the three ErrorBoundary variants. // All are intentionally kept dependency-light (no xertica-ui imports) so they // work even if the library itself fails to load. // ───────────────────────────────────────────────────────────────────────────── // ── Shared helpers ──────────────────────────────────────────────────────────── function isDev() { return import.meta.env.DEV; } // ── AppErrorFallback — root crash ───────────────────────────────────────────── /** * Full-screen fallback for root-level crashes. * Shown when a provider or the app shell itself throws. */ export function AppErrorFallback({ error, reset }: FallbackProps) { return (
Ocorreu um erro inesperado na aplicação. Tente recarregar a página ou entre em contato com o suporte se o problema persistir.
{isDev() && (
{error.message}
{error.stack ? `\n\n${error.stack}` : ''}
)}
Esta página encontrou um problema. Clique em "Tentar novamente" ou navegue para outra seção.
{error.message}
)}
Não foi possível carregar este conteúdo
{isDev() &&{error.message}
}