/** * @file app/(app)/error.tsx * @description Client-side error boundary component that renders an error fallback UI with recovery and navigation actions. */ "use client"; import Link from "next/link"; import { AlertTriangle, RefreshCw, ArrowLeft } from "lucide-react"; /** * Properties for the ErrorBoundary component. * * @interface ErrorBoundaryProps * @property {Error & { digest?: string }} error - The error object caught by the Next.js error boundary. * @property {() => void} reset - Function to reset the error boundary and attempt to re-render the segment. */ interface ErrorBoundaryProps { error: Error & { digest?: string }; reset: () => void; } /** * Renders an error boundary fallback UI displaying error details, a retry button, and navigation back to the summary page. * * @param {ErrorBoundaryProps} props - The component props. * @returns {JSX.Element} The rendered error boundary fallback component. */ export default function ErrorBoundary({ error, reset }: ErrorBoundaryProps) { return (
{/* Icon Badge */}
{/* Text Content */}

Something went wrong!

An unexpected error occurred while processing your request. You can try reloading this section or head back to your summary.

{error?.message && (
{error.message}
)}
{/* Action Buttons */}
{/* Try Again Button */} {/* Back to Summary Link */} Back to Summary
); }