import { MonitoringConsole } from "../../components/monitoring-console";

export default async function MonitorsPage(props: {
  searchParams?: Promise<Record<string, string | string[] | undefined>>;
}) {
  const searchParams = (await props.searchParams) ?? {};
  const runId = Array.isArray(searchParams.runId) ? searchParams.runId[0] : searchParams.runId;
  const targetId = Array.isArray(searchParams.targetId) ? searchParams.targetId[0] : searchParams.targetId;
  return <MonitoringConsole initialFocusRunId={runId} initialFocusTargetId={targetId} />;
}
