"use client";

import { ErrorState } from "@/components/ui/error-state";

/**
 * Error boundary for `/dashboard/*`. Keeps the authenticated shell (sidebar and
 * topbar) mounted so a single failing panel does not blank the whole app.
 */
export default function DashboardError({
  error,
  reset,
}: {
  error: Error & { digest?: string };
  reset: () => void;
}) {
  return (
    <div className="p-4 sm:p-6 lg:p-8">
      <ErrorState error={error} reset={reset} compact />
    </div>
  );
}
