import { redirect } from 'next/navigation';

/**
 * 2026-05-22: `/admin/reports` deleted. The page rendered three cards
 * - Pipeline funnel, Berth occupancy, and a KPI grid - all of which
 * are already covered by the main Dashboard widgets (`pipeline_funnel`,
 * `occupancy_timeline`, `kpi_*`). Redirecting to the dashboard so any
 * lingering bookmarks land somewhere coherent.
 *
 * The `<ReportsDashboard>` component file lives on in the repo for now
 * pending a follow-up sweep - once we confirm no other surface mounts
 * it, the component + its data hook can be removed too.
 */
export default async function ReportsLegacyRedirectPage({
  params,
}: {
  params: Promise<{ portSlug: string }>;
}) {
  const { portSlug } = await params;
  redirect(`/${portSlug}/dashboard`);
}
