"use client";

import ErrorState from "@/features/shared/components/ErrorState";

/**
 * Covers every route under `(main)` — it wraps the pages and nested layouts
 * below it, but not `(main)/layout.tsx` itself, so the Header and Footer stay
 * on screen while this renders in place of the page.
 */
export default function MainError({
  error,
  unstable_retry,
}: {
  error: Error & { digest?: string };
  unstable_retry: () => void;
}) {
  return <ErrorState error={error} onRetry={unstable_retry} />;
}
