import type { Metadata } from "next";
import { ProductLanding } from "@/components/products/ProductLanding";
import { getProductPageWithFallback } from "@/lib/product-pages/queries";

export const dynamic = "force-dynamic";

export async function generateMetadata(): Promise<Metadata> {
  const data = await getProductPageWithFallback("atlas");
  return {
    title: data.heroTitle,
    description: data.heroDescription,
    openGraph: {
      title: data.heroTitle,
      description: data.heroDescription,
    },
  };
}

export default async function AtlasPage() {
  const data = await getProductPageWithFallback("atlas");
  return <ProductLanding data={data} />;
}
