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 (
{/* Icon */}

Algo deu errado

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}` : ''}
        
)}
); } // ── PageErrorFallback — route-level crash ───────────────────────────────────── /** * Page-area fallback. Shown when a lazy chunk fails to load or a page * component throws. The app shell (header, sidebar) remains intact. */ export function PageErrorFallback({ error, reset }: FallbackProps) { return (

Erro ao carregar página

Esta página encontrou um problema. Clique em "Tentar novamente" ou navegue para outra seção.

{isDev() && (
          {error.message}
        
)}
); } // ── SectionErrorFallback — feature/section-level crash ──────────────────────── /** * Compact inline fallback for section-level errors (data tables, charts, * the assistant panel, etc.). Prevents one broken section from crashing the page. */ export function SectionErrorFallback({ error, reset }: FallbackProps) { return (

Não foi possível carregar este conteúdo

{isDev() &&

{error.message}

}
); }