import { DispatchHistory } from "@/components/dispatch-history";
import { listFailedTasks, listTaskEvents } from "@/lib/tasks";

export const dynamic = "force-dynamic";

export default async function DispatchPage() {
  const [events, failedTasks] = await Promise.all([
    listTaskEvents(undefined, 50),
    listFailedTasks(),
  ]);

  return <DispatchHistory events={events} failedTasks={failedTasks} />;
}
