import { Metadata, ResolvingMetadata } from "next";
import {
  VenueIndexView,
  loadVenueIndexProps,
} from "@/components/venues/VenueIndexView";
import { getSeoMetadata } from "@/lib/seo";

export async function generateMetadata(
  _: unknown,
  parent: ResolvingMetadata
): Promise<Metadata | null> {
  const { index } = await loadVenueIndexProps();
  return getSeoMetadata(index, parent);
}

export default async function Page() {
  const props = await loadVenueIndexProps();
  return <VenueIndexView {...props} />;
}
